You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is PR 2 of 2, stacked on #2271. It contains the sidecar telemetry lifecycle changes that were split out of that PR:
holds application telemetry until config or Stop can start the worker with the complete startup payload
keeps Stop and successor lifecycle actions in source order
fences runtime and session cleanup through the direct-telemetry receiver, including overlapping cleanup and reused instance IDs
keeps metrics/log workers and metric registrations scoped to their owning runtime
bounds pending application work and retries shared-memory publication
corrects stats exporter identity, accounting, and flush behavior
Motivation
#2271 is limited to the startup regression fix. The rest of the original change addresses cleanup, reconfiguration, and telemetry handoff races in the sidecar. Splitting them keeps the regression fix reviewable while preserving the broader hardening work here.
Additional Notes
Please review #2271 first. This PR is based on its branch and should be rebased onto main after it lands.
The large diff is concentrated in sidecar_server.rs and telemetry.rs, where the lifecycle coordination and its regression coverage live. It does not add generated code or change the public sidecar API.
This 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. Panic-inducing macros in particular should be avoided. In the future, this report may become a PR-blocking quality gate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is PR 2 of 2, stacked on #2271. It contains the sidecar telemetry lifecycle changes that were split out of that PR:
Stopcan start the worker with the complete startup payloadStopand successor lifecycle actions in source orderMotivation
#2271 is limited to the startup regression fix. The rest of the original change addresses cleanup, reconfiguration, and telemetry handoff races in the sidecar. Splitting them keeps the regression fix reviewable while preserving the broader hardening work here.
Additional Notes
Please review #2271 first. This PR is based on its branch and should be rebased onto
mainafter it lands.The large diff is concentrated in
sidecar_server.rsandtelemetry.rs, where the lifecycle coordination and its regression coverage live. It does not add generated code or change the public sidecar API.How to test the change?
cargo +nightly-2026-02-08 fmt --all -- --check cargo clippy -p datadog-sidecar --all-targets -- -D warnings cargo test -p datadog-sidecar -- --test-threads=1The sidecar suite passes with 94 unit tests and 5 doc tests.