feat(stats)!: send telemetry for cardinality limits#2159
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
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. |
📚 Documentation Check Results📦
|
🔒 Cargo Deny Results📦
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f971f0c30c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
98f8c1d to
fffe30d
Compare
2655975 to
bf5e284
Compare
fffe30d to
e5c0f96
Compare
bf5e284 to
ce821ea
Compare
e5c0f96 to
d97928e
Compare
ce821ea to
ebd7e4e
Compare
d97928e to
c84447e
Compare
| /// Metric name for the number of spans collapsed into the overflow sentinel bucket due to | ||
| /// per-bucket cardinality limiting. Emitted on both the DogStatsD health-metrics channel | ||
| /// and the instrumentation-telemetry channel. | ||
| pub const COLLAPSED_SPANS_METRIC: &str = "datadog.tracer.stats.collapsed_spans"; |
There was a problem hiding this comment.
Just a headsup that this name might change to datadog.tracer.stats_collapsed_spans as it seems the ".stats." namespace doesn't really exist for most tracers?
| } | ||
|
|
||
| /// Build a concentrator with `max_entries_per_bucket = 1` pre-seeded with four distinct spans | ||
| /// so that three spans is collapsed into the overflow bucket. |
There was a problem hiding this comment.
| /// so that three spans is collapsed into the overflow bucket. | |
| /// so that three spans are collapsed into the overflow bucket. |
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
|
| telemetry = ["libdd-telemetry"] | ||
| dogstatsd = ["libdd-dogstatsd-client"] | ||
| https = ["libdd-common/https", "libdd-capabilities-impl/https", "libdd-shared-runtime/https","libdd-telemetry?/https","libdd-dogstatsd-client?/https" ] | ||
| fips = ["libdd-common/fips", "libdd-capabilities-impl/fips", "libdd-shared-runtime/fips"] |
There was a problem hiding this comment.
Is fips support missing for the added crates?
| None, | ||
| None, |
There was a problem hiding this comment.
Why would we not want to benefit from that telemetry in PHP?
There was a problem hiding this comment.
You probably do I just wanted to limit the number of crates impacted by this PR (also why I enabled it in a separate PR for data-pipeline) but I can enable it for php too
There was a problem hiding this comment.
Please do so :-)
I definitely won't have this telemetry on my radar myself afterwards
| /// agent | ||
| /// - `meta` metadata used in ClientStatsPayload and as headers to send stats to the agent | ||
| /// - `endpoint` the Endpoint used to send stats to the agent | ||
| #[allow(clippy::too_many_arguments)] |
There was a problem hiding this comment.
| #[allow(clippy::too_many_arguments)] | |
| #[allow(clippy::too_many_arguments, reason = "TODO: refactor")] |
There was a problem hiding this comment.
I don't think it's an issue for the StatsExporter to have a many arguments for new , especially since all of them have different types. (maybe the two obfuscation ones could be wrapped in a struct)
There was a problem hiding this comment.
I was thinking about eventually using the builder pattern here maybe ?
It's just for readability tho, not blocking ofc

What does this PR do?
Add telemetry for the collapsed stats group based on this RFC
Motivation
Follow-up of #2158
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.