feat(telemetry)!: Add Installation signature and AppProduct changes payloads#2213
feat(telemetry)!: Add Installation signature and AppProduct changes payloads#2213bwoebi wants to merge 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
| pub use libdd_common::tag::{parse_tags, Tag}; | ||
| pub use libdd_common::{parse_uri, Endpoint}; |
There was a problem hiding this comment.
This is here. But we expose Tag currently publicly in data/metrics.rs. So we need that right now...
There was a problem hiding this comment.
Hasn't @hoolioh removed the need for Endpoint recently in Telemetry? But I guess if you need Tag anyway...
📚 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: 6f102bdf44
ℹ️ 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".
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub metadata: Option<Vec<DependencyMetadata>>, |
There was a problem hiding this comment.
Keep dependency metadata out of the store identity
Because Store<Dependency> deduplicates by the derived Hash/Eq, including the new metadata field in that identity makes the same package/version a second stored dependency when SCA metadata is attached after the initial dependency report. On the next extended heartbeat, unflush_stored() will re-send both the stale entry and the updated metadata entry for the same dependency; track identity by the stable dependency key and update metadata in place instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Might be worth looking into as well.
There was a problem hiding this comment.
True, addressed this.
BenchmarksComparisonBenchmark execution time: 2026-07-20 21:11:58 Comparing candidate commit 87f6745 in PR branch Found 2 performance improvements and 7 performance regressions! Performance is the same for 140 metrics, 10 unstable metrics.
|
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
|
And some smaller stuff like more metric namespaces & Rate MetricType.
| pub enum MetricType { | ||
| Gauge, | ||
| Count, | ||
| Rate, |
There was a problem hiding this comment.
Is it ok to add a field in the middle of repr(C) enum? Won't that change the integer representation of Distribution?
There was a problem hiding this comment.
It will, but stuff is compiled together / cbdingen hopefully rerun? But let me move it down just to be sure.
There was a problem hiding this comment.
I'm not too worried about the Rust part, but a potential FFI consumer. I have no idea who consumes this, so it's purely defensive...
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub metadata: Option<Vec<DependencyMetadata>>, |
There was a problem hiding this comment.
Might be worth looking into as well.
| #[strum(serialize_all = "snake_case")] | ||
| pub enum ConfigurationOrigin { | ||
| EnvVar, | ||
| OtelEnvVar, |
There was a problem hiding this comment.
Same question about changing a repr(C) enum
There was a problem hiding this comment.
Note that several times stuff has been added before Unknown.
| pub use libdd_common::tag::{parse_tags, Tag}; | ||
| pub use libdd_common::{parse_uri, Endpoint}; |
There was a problem hiding this comment.
Hasn't @hoolioh removed the need for Endpoint recently in Telemetry? But I guess if you need Tag anyway...
|
Nothing blocking on my side, but I think some of the codex comments might be relevant to check |
| // Consolidated path: report health metrics through the externally-owned worker. | ||
| // We do not own it (no spawn, no start, no shutdown handle). | ||
| (Some(TelemetryClient::with_handle(shared_handle)), None) |
There was a problem hiding this comment.
Just a heads up: I don't know how you want to create it externally, but you should make sure to recreate the client on forks and recreate the writer with it (might be a bit tedious to make sure the fork hooks run in the right order). Currently the writer is recreated by the python NativeWriter which also recreates the telemetry client.
Using Keyed to avoid messing with Hash and Eq. Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
And some smaller stuff like more metric namespaces.
This bridges the gap to the current capabilities exposed by dd-trace-py.