mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-21 13:37:46 -05:00
* Add optional dial9 Tokio telemetry behind a `dial9` feature Integrate dial9 so storage runtimes can emit production-friendly Tokio traces. Recording is off unless the crate is built with `--features dial9` and DIAL9_ENABLED=true is set at runtime; with the feature off, runtime construction is byte-for-byte unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7X6MkjY3P7wpP2MfHdTDY * Enable dial9 CPU and schedule profiling Turn on cpu-profiling and sched events behind the same `dial9` feature, add the DIAL9_CPU_* / DIAL9_SCHEDULE_* env knobs, and document the frame pointer rustflags the stack unwinder needs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7X6MkjY3P7wpP2MfHdTDY * Harden dial9 env parsing and the writer-failure path - Reset Cargo.lock to the branch point and re-resolve, so the diff is additive instead of re-resolving unrelated packages. This drops the heck 0.5.0 -> 0.4.1 downgrade, which sat in the default build graph and would have changed proto codegen identifier casing. The remaining non-additive entry, toml_parser 1.0.9 -> 1.1.3, is forced by proc-macro-crate via dial9-trace-format-derive. - Parse DIAL9_* booleans the way dial9 does, accepting 1/y/yes/on and 0/n/no/off and warning on anything else. `str::parse::<bool>` took only exact lowercase true/false, so DIAL9_CPU_PROFILE_ENABLED=0 silently left 99 Hz sampling on and DIAL9_ENABLED=1 silently left recording off. - Require the numeric knobs to be positive. A zero disk budget made dial9 evict everything and stop recording within seconds while the log still reported telemetry enabled. - Treat a set-but-empty DIAL9_TRACE_DIR as unset. It skipped the /tmp fallback and wrote up to the full budget into the working directory, which is /qdrant next to storage/ in the official image. - Return a disabled guard as soon as the trace writer fails, before with_cpu_profiling and with_sched_events run. Those start their profilers eagerly, opening a perf event per thread and installing a process-global signal handler that build() would then discard. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7X6MkjY3P7wpP2MfHdTDY * Correct the dial9 docs and give them their own section - `--cfg tokio_unstable` is required for any task data at all, not merely for fuller coverage: dial9's poll, spawn and terminate hooks are all `#[cfg(tokio_unstable)]`, and nothing in the repo sets the flag. Without it there is no task timeline and DIAL9_TASK_TRACKING_ENABLED does nothing. - Document `-C debuginfo=2`. `[profile.perf]` inherits `release` and sets no `debug` key, so the documented build symbolized off the ELF symtab with inlined callees collapsed and no file or line, unlike `[profile.bench]` which sets `debug = true` for this reason. - Move the dial9 material out from between the feature list and the prose that belongs to it. Those paragraphs describe `tracing` instrumentation and read as dial9's when the example is wedged in front of them, which points readers at `#[tracing::instrument]` for a tool that records Tokio runtime events and no tracing spans. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7X6MkjY3P7wpP2MfHdTDY * Use cfg_select! --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: timvisee <tim@visee.me>
80 lines
2.2 KiB
TOML
80 lines
2.2 KiB
TOML
[package]
|
|
name = "storage"
|
|
version = "0.2.0"
|
|
authors = [
|
|
"Andrey Vasnetsov <vasnetsov93@gmail.com>",
|
|
"Qdrant Team <info@qdrant.tech>",
|
|
]
|
|
license = "Apache-2.0"
|
|
edition = "2024"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
tracing = ["dep:tracing", "api/tracing", "collection/tracing", "segment/tracing"]
|
|
staging = ["collection/staging"]
|
|
dial9 = ["dep:dial9"]
|
|
|
|
[dev-dependencies]
|
|
collection = { path = "../collection", features = ["testing"] }
|
|
fs-err = { workspace = true, features = ["debug"] }
|
|
proptest = { workspace = true }
|
|
mockito = { workspace = true }
|
|
env_logger = { workspace = true }
|
|
|
|
[dependencies]
|
|
ahash = { workspace = true }
|
|
fs-err = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
rand = { workspace = true }
|
|
tokio = { workspace = true }
|
|
tokio-util = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
schemars = { workspace = true }
|
|
itertools = { workspace = true }
|
|
log = { workspace = true }
|
|
tonic = { workspace = true }
|
|
http = { workspace = true }
|
|
parking_lot = { workspace = true }
|
|
strum = { workspace = true }
|
|
tap = { workspace = true }
|
|
tar = { workspace = true }
|
|
chrono = { workspace = true }
|
|
validator = { workspace = true }
|
|
dashmap = { workspace = true }
|
|
semver = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
|
|
# Consensus related
|
|
atomicwrites = { workspace = true }
|
|
raft = { workspace = true }
|
|
prost-for-raft = { workspace = true }
|
|
serde_cbor = { workspace = true }
|
|
|
|
common = { path = "../common/common" }
|
|
cancel = { path = "../common/cancel" }
|
|
issues = { path = "../common/issues" }
|
|
segment = { path = "../segment", default-features = false }
|
|
collection = { path = "../collection" }
|
|
shard = { path = "../shard" }
|
|
api = { path = "../api" }
|
|
wal = { path = "../wal" }
|
|
futures = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
uuid = { workspace = true }
|
|
url = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
|
|
tracing = { workspace = true, optional = true }
|
|
tracing-appender = "0.2"
|
|
|
|
# Optional Tokio telemetry (https://github.com/dial9-rs/dial9)
|
|
dial9 = { version = "0.5.0", optional = true, default-features = false, features = [
|
|
"tokio",
|
|
"cpu-profiling",
|
|
] }
|