Expand description
Core sampling logic for Datadog tracing
This crate provides generic sampling infrastructure including:
- Trait abstractions for trace IDs, attributes, and span properties
- Rate-based sampling algorithms
- Rate limiting functionality
- Glob pattern matching for sampling rules
- Sampling-related constants
- Rule-based sampling with pattern matching
- Agent-provided sampling rates
- Complete Datadog sampler implementation
Re-exports§
pub use dd_sampling::mechanism;pub use dd_sampling::priority;pub use dd_sampling::SamplingDecision;pub use dd_sampling::SamplingMechanism;pub use dd_sampling::SamplingPriority;
Modules§
- dd_
constants - dd_
sampling - Sampling types and mechanisms for Datadog distributed tracing.
Structs§
- Datadog
Sampler - A composite sampler that applies rules in order of precedence
- Parsed
Sampling Rules - Sampling
Rule - Represents a sampling rule with criteria for matching spans
- Sampling
Rule Config - Configuration for a single sampling rule
- Services
Sampler
Traits§
- Attribute
Factory - A trait for creating sampling attributes.
- Attribute
Like - A trait for accessing span attribute key-value pairs.
- Sampling
Data - A trait for accessing sampling data, combining trace ID and span properties.
- Span
Properties - A trait for accessing span properties needed for sampling decisions.
- Trace
IdLike - A trait for converting trace IDs to a numeric representation.
- Value
Like - A trait for extracting typed values from attribute values.
Type Aliases§
- Sampling
Rules Callback - Type alias for sampling rules update callback Consolidated callback type used across crates for remote config sampling updates