Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/rust-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ runs:
if [ "${{ inputs.toolchain }}" = nightly ]; then
rm -fv Cargo.lock
fi
# tokio's `taskdump` feature only compiles on linux aarch64/x86/x86_64.
# On macOS drop it from --all-features; leave everything else intact.
if [ "$RUNNER_OS" = "Linux" ]; then
# Raise locked-memory limit for large perf ring buffers
sudo prlimit --pid $$ --memlock=unlimited:unlimited
cargo test --all-targets --all-features
else
cargo test --all-targets \
--features analysis,cpu-profiling,tracing-layer,worker-s3
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we stay future proof with:
cargo hack test --each-feature --exclude-features taskdump

fi
cargo test --all-targets --all-features
39 changes: 37 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions dial9-tokio-telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ all-features = true
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(shuttle)"] }

[dependencies]
tokio = { version = "1.51.0", features = ["rt", "macros", "time", "rt-multi-thread", "sync", "net", "io-util"] }
tokio = { version = "1.52.0", features = ["rt", "macros", "time", "rt-multi-thread", "sync", "net", "io-util"] }
tokio-util = "0.7"
arc-swap = "1"
crossbeam-queue = "0.3"
Expand All @@ -29,6 +29,7 @@ pin-project-lite = "0.2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
smallvec = "1"
backtrace = { version = "0.3", optional = true }
dial9-perf-self-profile = { workspace = true, optional = true }
dial9-trace-format = { workspace = true, features = ["serde"] }
tracing = "0.1.44"
Expand All @@ -50,6 +51,11 @@ shuttle = { version = "0.9.1", optional = true }
analysis = []
cpu-profiling = ["dep:dial9-perf-self-profile"]
_shuttle = ["dep:shuttle", "metrique-timesource/custom-timesource", "metrique-timesource/test-util"]
## Capture async backtraces at tokio yield points. Linux-only
## (aarch64/x86/x86_64): tokio's upstream `taskdump` feature refuses to
## compile on other targets. Enabling this feature on an unsupported target
## is a hard compile error from tokio.
taskdump = ["tokio/taskdump", "dep:backtrace"]
tracing-layer = ["dep:tracing-subscriber"]
worker-s3 = ["dep:aws-sdk-s3-transfer-manager", "dep:aws-sdk-s3", "dep:aws-config", "dep:time"]

Expand All @@ -61,7 +67,7 @@ clap = { version = "4", features = ["derive", "env"] }
hdrhistogram = "7"
metrique-timesource = { version = "0.1", features = ["custom-timesource", "tokio"] }
metrique-writer = { version = "0.1", features = ["test-util"] }
tokio = { version = "1.51.0", features = ["test-util"] }
tokio = { version = "1.52.0", features = ["test-util"] }
proptest = "1"
tempfile = "3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand All @@ -74,7 +80,7 @@ async-trait = "0.1.89"
uuid = { version = "1", features = ["v4"] }

[target.'cfg(target_os = "linux")'.dev-dependencies]
dial9-tokio-telemetry = { path = ".", features = ["cpu-profiling", "worker-s3", "analysis", "tracing-layer"] }
dial9-tokio-telemetry = { path = ".", features = ["cpu-profiling", "worker-s3", "analysis", "taskdump", "tracing-layer"] }
nix = { version = "0.29", features = ["process"] }

[[bench]]
Expand Down
1 change: 1 addition & 0 deletions dial9-tokio-telemetry/examples/trace_to_fat_jsonl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ fn to_fat_event(event: &TelemetryEvent, reader: &TraceReader) -> Option<FatEvent
}),
TelemetryEvent::TaskSpawn { .. }
| TelemetryEvent::TaskTerminate { .. }
| TelemetryEvent::TaskDump { .. }
| TelemetryEvent::ThreadNameDef { .. }
| TelemetryEvent::SegmentMetadata { .. }
| TelemetryEvent::ClockSync { .. } => None,
Expand Down
2 changes: 2 additions & 0 deletions dial9-tokio-telemetry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub mod background_task;
pub(crate) mod metrics;
pub(crate) mod primitives;
pub(crate) mod rate_limit;
#[cfg(feature = "taskdump")]
pub(crate) mod task_dumped;
/// Core telemetry types, recording, and trace I/O.
pub mod telemetry;
pub(crate) mod traced;
Expand Down
Loading
Loading