feat(remote-config)!: use the proto file from the agent#2165
Conversation
# Motivation I am implementing an agentless RC client. In this context, libdatadog needs to behave like the agent, and needs to send protobuf data in a schema defined on the agent side. This PR updates the RC proto files to be in sync with the datadog agent.
📚 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. |
🔒 Cargo Deny Results📦
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86116268b4
ℹ️ 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".
| #[prost(bool, tag = "14")] | ||
| pub is_updater: bool, |
There was a problem hiding this comment.
Default the updater flag during serde deserialization
Because Client derives Deserialize, this newly added non-optional bool becomes required in the JSON form unless it has #[serde(default)]. Any ClientGetConfigsRequest JSON emitted by older tracers/libdatadog versions, which do not include is_updater, now fails to deserialize instead of getting the protobuf default false, so servers/tests using this struct cannot accept previously valid requests.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Is this a valid concern?
There was a problem hiding this comment.
Yes and no
Yes in that sense that that would be a real issue if we were actually parsing requests at runtime, with different clients.
No because the only time we do use the Deserialize implementation is in the test server in libdd-remote-config, and payloads generated by clients during tests have the same version of the crate as the test server so it doesn't cause issues
| bytes targets = 2; | ||
| repeated File target_files = 3; | ||
| repeated string client_configs = 4; | ||
| ConfigStatus config_status = 5; |
There was a problem hiding this comment.
Honor expired config status before applying configs
When an Agent returns CONFIG_STATUS_EXPIRED, this newly exposed field is ignored by ConfigFetcher::fetch_once, which still decodes targets, stores target files, and returns them as active configs. In environments where the Agent marks TUF metadata as expired, libdatadog will keep applying stale remote configurations instead of suppressing them or surfacing the expiration state.
Useful? React with 👍 / 👎.
| #[prost(uint64, tag = "15")] | ||
| pub heartbeat_timestamp: u64, | ||
| #[prost(float, tag = "16")] | ||
| pub completion: f32, |
There was a problem hiding this comment.
Default omitted updater package status fields
For JSON deserialization of updater clients, these newly added proto3 scalar fields are treated as required by Serde even though protobuf permits them to be absent and default to zero. An updater payload that omits zero-valued heartbeat_timestamp or completion now fails to deserialize instead of producing the protobuf defaults, so add #[serde(default)] for these fields when deriving Deserialize.
Useful? React with 👍 / 👎.
bantonsson
left a comment
There was a problem hiding this comment.
Are the codex comments valid?
They could have been relevant, but since we don't use these struct for deserializing other than in tests it's kind of a moot point |
## chore: release v37.0.0 Bumps the workspace version from `36.0.0` to `37.0.0` in `Cargo.toml` and regenerates `Cargo.lock`. ## Post-merge steps 1. Trigger the `create_release` job on GitLab — builds artifacts and creates a draft GitHub release. 2. Ask someone from `libdatadog-core` or `libdatadog-release` to publish the draft release. 3. Trigger the `release-proposal-dispatch` GitHub Actions workflow for per-crate crates.io publishing: crates: libdd-data-pipeline,libdd-trace-stats,libdd-trace-utils,libdd-ddsketch ## Notable changes since v36.0.0 - `feat(data-pipeline)`: export client-computed span stats as OTLP trace metrics (#2067) - `feat(otel-thread-ctx)`: add self check capability (#2095) - `fix(trace-stats)`: add `grpc_method` to aggregation key (#2151) - `feat(data-pipeline)`: add stdout log trace exporter (#2074) - `feat(remote-config)`: use the proto file from the agent (#2165) - `feat(sidecar)`: expose `default_service_name` for `svc.*` process tags (#2053) - feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility (#2091) Co-authored-by: munir.abdinur <[email protected]>
…ibdd-data-pipeline, libdd-li... (#2201) # Release proposal for libdd-capabilities-impl, libdd-common, libdd-data-pipeline, libdd-library-config, libdd-remote-config, libdd-sampling, 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. ## libdd-capabilities **Next version:** `2.1.0` **Semver bump:** `minor` **Tag:** `libdd-capabilities-v2.1.0` ### Commits - feat(data-pipeline)!: add stdout log trace exporter (#2074) ## libdd-common **Next version:** `5.1.0` **Semver bump:** `minor` **Tag:** `libdd-common-v5.1.0` ### Commits - refactor(clippy): prefer core and alloc imports (#2196) - fix: update rustls-webpki to 0.103.13 (#2187) - fix: update anyhow for unsoundness (#2186) - feat(machine id): Add helpers in ddcommon to fetch the machine UUID l… (#2163) ## libdd-ddsketch **Next version:** `1.1.0` **Semver bump:** `minor` **Tag:** `libdd-ddsketch-v1.1.0` ### Commits - feat(data-pipeline)!: export client-computed span stats as OTLP trace metrics (#2067) - test(ddsketch): add microbenchmarks for add/encode/collapse (#2125) ## libdd-trace-protobuf **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-protobuf-v4.0.0` ### Commits - chore!: update protobufs to be in sync with datadog-agent (#2180) - feat(stats)!: add whole key cardinality limit (#2158) - feat(remote-config)!: use the proto file from the agent (#2165) - feat(data-pipeline): OTLP HTTP/protobuf trace export (#2115) ## libdd-capabilities-impl **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-impl-v3.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.1.0 → ^5.1.0 ### Commits - feat(data-pipeline)!: add stdout log trace exporter (#2074) ## libdd-library-config **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-library-config-v3.0.0` ###⚠️ major bump forced due to: - `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0 ### Commits - refactor(clippy): prefer core and alloc imports (#2196) - feat(library-config)!: caller-supplied threadlocal schema and extra process-context attributes (#2162) - fix(otel-thread-ctx): put the threadlocal attributes at the right place in the context (#2167) ## libdd-remote-config **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-remote-config-v2.0.0` ###⚠️ major bump forced due to: - `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0 ### Commits - refactor(libdd-remote-config)!: hide Target inner properties so they are not leaked (#2182) - feat(remote-config)!: use the proto file from the agent (#2165) - refactor(rc): reexport Endpoint and Tag common types (#2147) ## libdd-trace-normalization **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-normalization-v3.0.0` ###⚠️ major bump forced due to: - `libdd-trace-protobuf`: ^3.0.1 → ^4.0.0 ### Commits - feat(data-pipeline)!: CSS Trace Filters (#1985) ## libdd-shared-runtime **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-shared-runtime-v2.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.1.0 → ^5.1.0 ### Commits - feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061) - feat(shared-runtime)!: use weak waker in trigger [APMSP-3371] (#2050) ## libdd-trace-utils **Next version:** `9.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v9.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.2.0 → ^5.1.0 - `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0 ### Commits - ci(miri): skip slow miri tests (#2188) - chore!: update protobufs to be in sync with datadog-agent (#2180) - feat(data-pipeline): add agentless export (#2081) - feat(data-pipeline)!: add stdout log trace exporter (#2074) - feat(data-pipeline): OTLP HTTP/protobuf trace export (#2115) - feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility (#2091) - test(trace-utils): add V05 msgpack decode microbenchmark (#2127) - feat(data-pipeline)!: export client-computed span stats as OTLP trace metrics (#2067) - test(trace-utils): add VecMap microbenchmarks (#2126) - chore(stats)!: submit p0 telemetry in stats (#2130) - refactor(change-buffer)!: replace slot index with span_id, fix segment isolation (#2105) - feat(data-pipeline)!: CSS Trace Filters (#1985) - feat(trace-exporter): add v1 span and its encoder (#2039) - fix(trace-utils): mark decoded span maps as deduped (#2110) - feat(trace-utils)!: change buffer implementation (#2055) - feat(native-spans)!: change buffer foundation (#2046) - refactor(span)!: use VecMap for `meta`, `metrics` and `meta_struct` for v04 spans (#2043) - test: fix timeouts on heavily contended scenarios (#2093) ## libdd-telemetry **Next version:** `6.0.0` **Semver bump:** `major` **Tag:** `libdd-telemetry-v6.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.2.0 → ^5.1.0 - `libdd-shared-runtime`: ^1.0.0 → ^2.0.0 ### Commits - ci(miri): skip slow miri tests (#2188) - refactor(libdd-telemetry)!: avoid leaking libdd-common types in the public API (#2152) - feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061) ## libdd-trace-obfuscation **Next version:** `5.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-obfuscation-v5.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.2.0 → ^5.1.0 - `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0 - `libdd-trace-utils`: ^8.0.0 → ^9.0.0 ### Commits - refactor(clippy): prefer core and alloc imports (#2196) - ci(miri): skip slow miri tests (#2188) - fix: update anyhow for unsoundness (#2186) ## libdd-trace-stats **Next version:** `6.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-stats-v6.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.2.0 → ^5.1.0 - `libdd-shared-runtime`: ^1.0.0 → ^2.0.0 - `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0 - `libdd-trace-utils`: ^8.0.0 → ^9.0.0 ### Commits - chore!: update protobufs to be in sync with datadog-agent (#2180) - feat(stats)!: send telemetry for cardinality limits (#2159) - feat(stats)!: add whole key cardinality limit (#2158) - fix(trace-stats)!: add grpc_method to aggregation key (#2151) - feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061) - feat(data-pipeline)!: export client-computed span stats as OTLP trace metrics (#2067) - refactor(span)!: use VecMap for `meta`, `metrics` and `meta_struct` for v04 spans (#2043) ## libdd-data-pipeline **Next version:** `7.0.0` **Semver bump:** `major` **Tag:** `libdd-data-pipeline-v7.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.2.0 → ^5.1.0 - `libdd-shared-runtime`: ^1.0.0 → ^2.0.0 - `libdd-telemetry`: ^5.0.1 → ^6.0.0 - `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0 - `libdd-trace-stats`: ^5.0.0 → ^6.0.0 - `libdd-trace-utils`: ^8.0.0 → ^9.0.0 ### Commits - feat(trace_exporter): enable telemetry in stats exporter (#2160) - refactor(libdd-telemetry)!: avoid leaking libdd-common types in the public API (#2152) - feat(stats): emit canonical gRPC status name for OTLP rpc.response.status_code (#2183) - feat(data-pipeline): add agentless export (#2081) - feat(stats)!: send telemetry for cardinality limits (#2159) - feat(stats)!: add whole key cardinality limit (#2158) - fix(trace-stats)!: add grpc_method to aggregation key (#2151) - feat(data-pipeline)!: add stdout log trace exporter (#2074) - feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061) - feat(data-pipeline): OTLP HTTP/protobuf trace export (#2115) - feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility (#2091) - feat(data-pipeline)!: export client-computed span stats as OTLP trace metrics (#2067) - chore(stats)!: submit p0 telemetry in stats (#2130) - feat(data-pipeline)!: CSS Trace Filters (#1985) - feat(shared-runtime)!: use weak waker in trigger [APMSP-3371] (#2050) - refactor(span)!: use VecMap for `meta`, `metrics` and `meta_struct` for v04 spans (#2043) - feat(stats)!: add endpoint gating to client-side stats [APMSP-3361] (#2040) ## libdd-dogstatsd-client **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-dogstatsd-client-v4.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.1.0 → ^5.1.0 ## libdd-sampling **Next version:** `5.0.0` **Semver bump:** `major` **Tag:** `libdd-sampling-v5.0.0` ###⚠️ major bump forced due to: - `libdd-common`: ^4.2.0 → ^5.1.0 - `libdd-trace-utils`: ^8.0.0 → ^9.0.0 [APMSP-3371]: https://datadoghq.atlassian.net/browse/APMSP-3371?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: iunanua <[email protected]>
# Motivation I am implementing an agentless RC client. In this context, libdatadog needs to behave like the agent, and needs to send protobuf data in a schema defined on the agent side. This PR updates the RC proto files to be in sync with the datadog agent. # What does this PR do? A brief description of the change being made with this pull request. # Motivation What inspired you to submit this pull request? # Additional Notes Anything else we should know when reviewing? # How to test the change? Describe here in detail how the change can be validated. Signed-off-by: Taegyun Kim <[email protected]>
## chore: release v37.0.0 Bumps the workspace version from `36.0.0` to `37.0.0` in `Cargo.toml` and regenerates `Cargo.lock`. ## Post-merge steps 1. Trigger the `create_release` job on GitLab — builds artifacts and creates a draft GitHub release. 2. Ask someone from `libdatadog-core` or `libdatadog-release` to publish the draft release. 3. Trigger the `release-proposal-dispatch` GitHub Actions workflow for per-crate crates.io publishing: crates: libdd-data-pipeline,libdd-trace-stats,libdd-trace-utils,libdd-ddsketch ## Notable changes since v36.0.0 - `feat(data-pipeline)`: export client-computed span stats as OTLP trace metrics (#2067) - `feat(otel-thread-ctx)`: add self check capability (#2095) - `fix(trace-stats)`: add `grpc_method` to aggregation key (#2151) - `feat(data-pipeline)`: add stdout log trace exporter (#2074) - `feat(remote-config)`: use the proto file from the agent (#2165) - `feat(sidecar)`: expose `default_service_name` for `svc.*` process tags (#2053) - feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility (#2091) Co-authored-by: munir.abdinur <[email protected]> Signed-off-by: Taegyun Kim <[email protected]>
Motivation
I am implementing an agentless RC client. In this context, libdatadog needs to behave like the agent, and needs to send protobuf data in a schema defined on the agent side.
This PR updates the RC proto files to be in sync with the datadog agent.
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.