dogstatsd: drop DD_USE_DOGSTATSD=false override when dataPlane handles DSD#2965
Conversation
…s DSD The Core Agent now observes data_plane.enabled and delegates DogStatsD to the Data Plane on its own (DataDog/datadog-agent#49891), so the operator no longer needs to set DD_USE_DOGSTATSD=false on the Core Agent (or on the single-container agent) when the dataPlane feature handles DSD. Combined with #2935 (which defaults dataPlane.dogstatsd.enabled to true), enabling dataPlane.enabled is sufficient to route DSD onto ADP.
- Mention both data_plane.enabled and data_plane.dogstatsd.enabled in ManageNodeAgent's comment, since the Core Agent uses both to decide whether to run DogStatsD itself or delegate it to ADP. - Remove the now-superfluous DD_USE_DOGSTATSD assertions from the unit and e2e tests (no need to negatively assert the env var is unset), along with the assertContainerDoesNotHaveEnvVar helper.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3137e77f5e
ℹ️ 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".
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2965 +/- ##
==========================================
+ Coverage 41.39% 41.89% +0.50%
==========================================
Files 327 327
Lines 28979 29709 +730
==========================================
+ Hits 11996 12448 +452
- Misses 16123 16382 +259
- Partials 860 879 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 22 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 1cc7985 | Docs | Datadog PR Page | Give us feedback! |
On Agent < 7.75, DD_DATA_PLANE_ENABLED / DD_DATA_PLANE_DOGSTATSD_ENABLED are unrecognised so the Core Agent starts DSD regardless, causing a bind conflict with ADP. Restore the explicit DD_USE_DOGSTATSD=false override for those agents while keeping the cleaner no-override path for >= 7.75. Uses the existing IsAboveMinVersion / GetAgentVersionFromImage machinery (same pattern as ProcessConfig, AppSec, KSM Core). Unknown / custom image tags fall back to AgentLatestVersion (7.77.2 > 7.75.0 → no override).
d3e7b0d
into
main
Summary
The Core Agent now observes
data_plane.enabledand delegates DogStatsD to the Data Plane on its own (DataDog/datadog-agent#49891). Combined with #2935, which defaultsdataPlane.dogstatsd.enabledtotrue, simply settingdataPlane.enabled: trueis now enough to route DSD onto ADP. SettingDD_USE_DOGSTATSDtofalseon the Core Agent actually ends up having ADP stop due to it causingdata_plane.dogstatsd.enabledto be set tofalseand streamed to ADP.Test plan
go test ./internal/controller/datadogagent/feature/dogstatsd/...go test ./internal/controller/datadogagent/feature/dataplane/... ./internal/controller/datadogagent/feature/test/...make lint🤖 Generated with Claude Code