feat(stats)!: per-key cardinality limits#2211
Conversation
📚 Documentation Check Results📦
|
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 39427ce | Docs | Datadog PR Page | Give us feedback! |
🔒 Cargo Deny Results📦
|
|
@codex review |
a5a4786 to
2845fa8
Compare
2845fa8 to
fca0f65
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5a4786925
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| client_side_stats: StatsComputationConfig { | ||
| status: ArcSwap::new(stats.into()), | ||
| stats_cardinality_limit: self.stats_cardinality_limit, | ||
| stats_cardinality_limits: self.stats_cardinality_limits, |
There was a problem hiding this comment.
Apply configured limits to OTLP stats
For exporters configured with OTLP metrics, the stats concentrator is created earlier with None for the new cardinality limits, and check_agent_info returns early when otlp_stats_enabled, so the value stored here never reaches that path. In that configuration, callers using set_stats_cardinality_limit still get the defaults for OTLP trace metrics instead of their configured per-key limits; pass self.stats_cardinality_limits into the OTLP SpanConcentrator::new call as well.
Useful? React with 👍 / 👎.
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d82ebfd172
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
abb8d3a to
efe280f
Compare
7538b80 to
35d265b
Compare
save memory by storing value hashes only, u64 has enough values to make collisions rare and in case we still get a collision storing 1 extra key should be fine
…alityLimitConfig binding
efe280f to
83043a4
Compare
BenchmarksComparisonBenchmark execution time: 2026-07-10 13:03:13 Comparing candidate commit 83043a4 in PR branch Found 2 performance improvements and 5 performance regressions! Performance is the same for 170 metrics, 10 unstable metrics.
|
What does this PR do?
Implement per-key cardinality limits to stats computation.
Also:
[]->[tracer_blocked_value]encode_grouped_statsmeta with empty value:key:->key(breaking change ?)Motivation
CSS spec compliance.
Additional Notes
Todo:
How to test the change?