Repository navigation
feat(trace_utils)!: add mutable metadata - #2545
Conversation
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
|
BenchmarksComparisonBenchmark execution time: 2026-09-28 14:11:22 Comparing candidate commit 9e5579d in PR branch Found 7 performance improvements and 8 performance regressions! Performance is the same for 162 metrics, 0 unstable metrics.
|
c1b974e to
19885ab
Compare
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 9e5579d | Docs | View more details | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d7f2f9909
ℹ️ 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".
yannham
left a comment
There was a problem hiding this comment.
I haven't looked at yet, but I wonder how this will interact with metadata publication in libdd_library_config_ffi::tracer_metadata::ddog_tracer_metadata_store (which publishes the metadata to some shared memory, including the OTel process context). Which I think more or less assume that the metadata are immutable once published. Should re-publication be automatic (if that's even possible) upon modification? Or we will ask the tracers to re-publish manually if the want to update?
|
Currently the runtime_id already changes on a fork. I'm not sure how |
9d90564 to
dc4b783
Compare
yannham
left a comment
There was a problem hiding this comment.
In general I have a vague feeling that we're surfacing internal details to external API...I wonder if we could hide MutableMetadata a bit more, and just offer traditional get/set API externally
af2fbfc to
e6be726
Compare
…ibdd-data-pipeline, libdd-li... (#2619) <!-- release-proposal-inputs: {"crates":"libdd-capabilities-impl, libdd-common, libdd-data-pipeline, libdd-library-config, libdd-profiling-heap-allocator, libdd-remote-config, libdd-sampling, libdd-shared-runtime, libdd-telemetry, libdd-tinybytes, libdd-trace-utils","main_start_ref":"","level_overrides":"","bypass_standard_checks":false} --> # Release proposal for libdd-capabilities-impl, libdd-common, libdd-data-pipeline, libdd-library-config, libdd-profiling-heap-allocator, libdd-remote-config, libdd-sampling, libdd-shared-runtime, libdd-telemetry, libdd-tinybytes, libdd-trace-utils and their dependencies This PR contains version bumps based on public API changes and commits since last release. ###⚠️ Crates left out of this proposal affected by its major bumps These publishable workspace crates are not part of this release but their dependency requirement was rewritten on this branch while their published version still requires the old major. If they are a dependency on your deployment not including them in the release could result in duplicate packages or symbol incompatibility. - `libdd-capabilities-impl` `6.0.0` → `7.0.0` affects: `libdd-crashtracker`, `libdd-live-debugger`, `libdd-tracer-flare` - `libdd-common` `7.0.0` → `8.0.0` affects: `libdd-crashtracker`, `libdd-ffe`, `libdd-http-client`, `libdd-ipc`, `libdd-live-debugger`, `libdd-profiling`, `libdd-tracer-flare` - `libdd-data-pipeline` `11.0.0` → `12.0.0` affects: `libdd-live-debugger` - `libdd-remote-config` `6.0.0` → `7.0.0` affects: `libdd-ffe`, `libdd-live-debugger`, `libdd-tracer-flare` - `libdd-telemetry` `9.0.0` → `10.0.0` affects: `libdd-crashtracker` - `libdd-trace-stats` `10.0.0` → `11.0.0` affects: `libdd-ipc` - `libdd-trace-utils` `13.0.0` → `14.0.0` affects: `libdd-tracer-flare` ## libdd-capabilities **Next version:** `4.0.1` **Semver bump:** `patch` **Tag:** `libdd-capabilities-v4.0.1` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-common **Next version:** `8.0.0` **Semver bump:** `major` **Tag:** `libdd-common-v8.0.0` ### Commits - fix(ipc)!: use atomic deadlines for shared limiters (#2604) - feat(sidecar)!: Authenticate sidecar connections and shared memory (#2551) - build: Update workspace to Rust 2024 edition (#2575) - feat(trace_utils)!: add mutable metadata (#2545) ## libdd-ddsketch **Next version:** `1.1.3` **Semver bump:** `patch` **Tag:** `libdd-ddsketch-v1.1.3` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-profiling-heap-sampler **Next version:** `1.1.1` **Semver bump:** `patch` **Tag:** `libdd-profiling-heap-sampler-v1.1.1` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-tinybytes **Next version:** `1.1.5` **Semver bump:** `patch` **Tag:** `libdd-tinybytes-v1.1.5` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-trace-protobuf **Next version:** `5.1.0` **Semver bump:** `minor` **Tag:** `libdd-trace-protobuf-v5.1.0` ### Commits - fix(data-pipeline)!: revert changes that made /info un-parsable (#2586) - build: Update workspace to Rust 2024 edition (#2575) ## libdd-capabilities-impl **Next version:** `7.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-impl-v7.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 ### Commits - feat(sidecar)!: Authenticate sidecar connections and shared memory (#2551) - build: Update workspace to Rust 2024 edition (#2575) ## libdd-profiling-heap-allocator **Next version:** `1.2.0` **Semver bump:** `minor` **Tag:** `libdd-profiling-heap-allocator-v1.2.0` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-library-config **Next version:** `4.2.0` **Semver bump:** `minor` **Tag:** `libdd-library-config-v4.2.0` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-trace-normalization **Next version:** `4.2.0` **Semver bump:** `minor` **Tag:** `libdd-trace-normalization-v4.2.0` ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-remote-config **Next version:** `7.0.0` **Semver bump:** `major` **Tag:** `libdd-remote-config-v7.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 ### Commits - feat(sidecar)!: Authenticate sidecar connections and shared memory (#2551) - build: Update workspace to Rust 2024 edition (#2575) ## libdd-shared-runtime **Next version:** `6.0.0` **Semver bump:** `major` **Tag:** `libdd-shared-runtime-v6.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-trace-utils **Next version:** `14.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v14.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 ### Commits - feat(trace-utils): add _dd.sdk.otlp_export and datadog.sdk.semantics OTLP resource attributes (#2603) - build: Update workspace to Rust 2024 edition (#2575) - feat(trace_utils)!: add mutable metadata (#2545) ## libdd-dogstatsd-client **Next version:** `8.0.0` **Semver bump:** `major` **Tag:** `libdd-dogstatsd-client-v8.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 ### Commits - feat(sidecar)!: Authenticate sidecar connections and shared memory (#2551) - build: Update workspace to Rust 2024 edition (#2575) ## libdd-telemetry **Next version:** `10.0.0` **Semver bump:** `major` **Tag:** `libdd-telemetry-v10.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 ### Commits - build: Update workspace to Rust 2024 edition (#2575) - feat(telemetry)!: Use mutable metadata (#2552) ## libdd-sampling **Next version:** `8.0.0` **Semver bump:** `major` **Tag:** `libdd-sampling-v8.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 - `libdd-trace-utils`: ^13.0.0 → ^14.0.0 ### Commits - build: Update workspace to Rust 2024 edition (#2575) ## libdd-trace-obfuscation **Next version:** `10.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-obfuscation-v10.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 - `libdd-trace-utils`: ^13.0.0 → ^14.0.0 ### Commits - fix(data-pipeline)!: revert changes that made /info un-parsable (#2586) - build: Update workspace to Rust 2024 edition (#2575) - feat(obfuscation)!: make json transforms caller-provided (#2548) ## libdd-trace-stats **Next version:** `11.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-stats-v11.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 - `libdd-telemetry`: ^9.0.0 → ^10.0.0 - `libdd-trace-obfuscation`: ^9.0.0 → ^10.0.0 - `libdd-trace-utils`: ^13.0.0 → ^14.0.0 ### Commits - feat(sidecar)!: Authenticate sidecar connections and shared memory (#2551) - build: Update workspace to Rust 2024 edition (#2575) - feat(trace_utils)!: add mutable metadata (#2545) - fix(stats): fix precedence for http endpoint (#2582) ## libdd-data-pipeline-core **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-data-pipeline-core-v3.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 - `libdd-trace-obfuscation`: ^9.0.0 → ^10.0.0 - `libdd-trace-stats`: ^10.0.0 → ^11.0.0 - `libdd-trace-utils`: ^13.0.0 → ^14.0.0 ### Commits - build: Update workspace to Rust 2024 edition (#2575) - feat(trace_utils)!: add mutable metadata (#2545) ## libdd-data-pipeline **Next version:** `12.0.0` **Semver bump:** `major` **Tag:** `libdd-data-pipeline-v12.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^7.0.0 → ^8.0.0 - `libdd-telemetry`: ^9.0.0 → ^10.0.0 - `libdd-trace-obfuscation`: ^9.0.0 → ^10.0.0 - `libdd-trace-stats`: ^10.0.0 → ^11.0.0 - `libdd-trace-utils`: ^13.0.0 → ^14.0.0 ### Commits - feat(trace-utils): add _dd.sdk.otlp_export and datadog.sdk.semantics OTLP resource attributes (#2603) - fix(data-pipeline)!: revert changes that made /info un-parsable (#2586) - build: Update workspace to Rust 2024 edition (#2575) - feat(telemetry)!: Use mutable metadata (#2552) - feat(trace_utils)!: add mutable metadata (#2545) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: iunanua <18325288+iunanua@users.noreply.github.com>
What does this PR do?
Introduce a shared structure for mutable metadata. All the components hold a
MutableMetadataHandlewhich stores an ArcSwap of the mutable fields. The SDK can update these values and the components must load the new value whenever they access them.Motivation
Allow runtime_id to be updated without recreating components. Other values will benefit from this feature e.g. process_tags, test_session_token.
Breaking change
What changed
TracerMetadataruntime_id,process_tagsmutable_metadata: MutableMetadataHandleStatsMetadataruntime_id,process_tagsmutable_metadata: MutableMetadataHandleOtlpResourceInforuntime_id,process_tagsmutable_metadata: MutableMetadataHandleFormats are unchanged:
runtime_idis a runtime UUID;process_tagsis acomma-separated
key:valuestring.Migrating construction
Replace the two removed fields with one
MutableMetadataHandle. Initialize it froma
MutableMetadatasnapshot:Migrating field reads
Values are no longer stored on the struct; read a snapshot through the handle at the
point of use:
APMSP-3368 [APMSP-3369]