Skip to content

dogstatsd: drop DD_USE_DOGSTATSD=false override when dataPlane handles DSD#2965

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
mainfrom
jszwedko/remove-use-dogstatsd-override
May 4, 2026
Merged

dogstatsd: drop DD_USE_DOGSTATSD=false override when dataPlane handles DSD#2965
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
mainfrom
jszwedko/remove-use-dogstatsd-override

Conversation

@jszwedko

@jszwedko jszwedko commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The Core Agent now observes data_plane.enabled and delegates DogStatsD to the Data Plane on its own (DataDog/datadog-agent#49891). Combined with #2935, which defaults dataPlane.dogstatsd.enabled to true, simply setting dataPlane.enabled: true is now enough to route DSD onto ADP. Setting DD_USE_DOGSTATSD to false on the Core Agent actually ends up having ADP stop due to it causing data_plane.dogstatsd.enabled to be set to false and streamed to ADP.

Test plan

🤖 Generated with Claude Code

…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.
@jszwedko
jszwedko marked this pull request as ready for review May 2, 2026 19:04
@jszwedko
jszwedko requested a review from a team May 2, 2026 19:04
@jszwedko
jszwedko requested a review from a team as a code owner May 2, 2026 19:04
@jszwedko jszwedko added this to the v1.27.0 milestone May 2, 2026
@jszwedko jszwedko added the bug Something isn't working label May 2, 2026
@jszwedko jszwedko modified the milestones: v1.27.0, v1.26.0 May 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread internal/controller/datadogagent/feature/dogstatsd/feature.go
@codecov-commenter

codecov-commenter commented May 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.89%. Comparing base (658de74) to head (1cc7985).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/testutils/builder.go 0.00% 6 Missing ⚠️
...nal/controller/datadogagent/feature/utils/utils.go 0.00% 5 Missing ⚠️
...ntroller/datadogagent/feature/dogstatsd/feature.go 85.71% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 41.89% <33.33%> (+0.50%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ntroller/datadogagent/feature/dogstatsd/feature.go 72.72% <85.71%> (+0.33%) ⬆️
...nal/controller/datadogagent/feature/utils/utils.go 0.00% <0.00%> (ø)
pkg/testutils/builder.go 0.00% <0.00%> (ø)

... and 22 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 658de74...1cc7985. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-official

datadog-official Bot commented May 2, 2026

Copy link
Copy Markdown

Code Coverage

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 37.50% (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 37.50%
Overall Coverage: 41.98% (+0.45%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1cc7985 | Docs | Datadog PR Page | Give us feedback!

@tbavelier tbavelier modified the milestones: v1.26.0, v1.27.0 May 4, 2026

@tobz tobz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍🏻

jszwedko added 2 commits May 4, 2026 09:05
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).
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit d3e7b0d into main May 4, 2026
57 of 59 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the jszwedko/remove-use-dogstatsd-override branch May 4, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants