[package]
name = "nm_otel_impl"
description = "Implementation crate for nm_otel - do not reference directly"
publish = true
version = "0.4.12"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

[package.metadata.docs.rs]
all-features = true

# These dev-dependencies are consumed only by `[[bench]]` entries that declare
# `required-features = ["private-test-util"]`. When udeps runs without
# `--all-features`, the benches are skipped, so the dev-deps appear unused.
# Ignore them here to silence false positives.
[package.metadata.cargo-udeps.ignore]
development = ["criterion", "gungraun", "many_cpus", "par_bench"]

[lib]
# nm_otel_impl exists only to host the implementation of `nm_otel` and to expose
# internal items to in-workspace tests/benches; user-facing documentation lives in
# `nm_otel`.
doc = false

[features]
# Internal-only API surface for in-workspace tests and benchmarks. Never
# forwarded by the `nm_otel` shell crate, so end-user builds never see these
# items. See docs/impl-crate-split.md for the `test-util` vs
# `private-test-util` distinction.
private-test-util = []

[dependencies]
foldhash = { workspace = true }
futures = { workspace = true }
hashbrown = { workspace = true, features = ["default-hasher", "inline-more"] }
nm = { workspace = true }
opentelemetry = { workspace = true, features = ["metrics"] }
tick = { workspace = true }

[dev-dependencies]
alloc_tracker = { path = "../alloc_tracker" }
criterion = { workspace = true }
many_cpus = { path = "../many_cpus" }
mutants = { workspace = true }
new_zealand = { path = "../new_zealand" }
nm_impl = { path = "../nm_impl", features = ["private-test-util"] }
# `nm_otel` is a dev-dep so doctests, examples, and benches can write
# `use nm_otel::Publisher;` exactly as user code would, matching the documentation
# rendered for `nm_otel`. This forms an allowed dev-dependency-only cycle.
nm_otel = { path = "../nm_otel" }
opentelemetry_sdk = { workspace = true, features = ["metrics", "testing"] }
par_bench = { path = "../par_bench", features = ["alloc_tracker", "criterion"] }
static_assertions = { workspace = true }
testing = { path = "../testing" }
tick = { workspace = true, features = ["tokio", "test-util"] }
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "time"] }

# Gungraun drives Valgrind-based Callgrind benchmarks; Linux-only.
[target.'cfg(target_os = "linux")'.dev-dependencies]
gungraun = { workspace = true, features = ["default"] }

[[bench]]
name = "nm_otel_export"
harness = false
required-features = ["private-test-util"]

[[bench]]
name = "nm_otel_export_cg"
harness = false
required-features = ["private-test-util"]

[lints]
workspace = true
