libdd-sampling 2.0.0

Core sampling logic for Datadog tracing
Documentation
# Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
# SPDX-License-Identifier: Apache-2.0

[package]
name = "libdd-sampling"
version = "2.0.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage = "https://github.com/DataDog/libdatadog/tree/main/libdd-sampling"
repository = "https://github.com/DataDog/libdatadog/tree/main/libdd-sampling"
description = "Core sampling logic for Datadog tracing"
authors.workspace = true
autobenches = false

[lib]
bench = false

[[bench]]
name = "sampling_bench"
harness = false
path = "benches/sampling_bench.rs"
required-features = ["v04_span"]

[[bench]]
name = "glob_matcher_bench"
harness = false
path = "benches/glob_matcher_bench.rs"
required-features = ["bench-internals"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
lru = "0.16.3"
libdd-common = { path = "../libdd-common", version = "4.2.0", default-features = false }
libdd-trace-utils = { path = "../libdd-trace-utils", version = "6.0.0", optional = true }

[features]
v04_span = ["dep:libdd-trace-utils"]
# Exposes internal modules (e.g. `glob_matcher`) for benchmarks. Not intended for downstream
# consumers — enable only when running benches in this crate.
bench-internals = []

[dev-dependencies]
criterion = "0.5"
libdd-common = { path = "../libdd-common", version = "4.2.0", features = ["bench-utils"] }