Skip to content

statsd: add missing originDetection for DistributionSamples#366

Draft
KowalskiThomas wants to merge 2 commits into
DataDog:masterfrom
KowalskiThomas:kowalski/statsd-fix-dd_external_env
Draft

statsd: add missing originDetection for DistributionSamples#366
KowalskiThomas wants to merge 2 commits into
DataDog:masterfrom
KowalskiThomas:kowalski/statsd-fix-dd_external_env

Conversation

@KowalskiThomas

@KowalskiThomas KowalskiThomas commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR fixes an issue in datadog-go where DistributionSamples would not properly forward originDetection: c.clientEx.originDetection to the metric struct, resulting in possibly incomplete tags (some would not be inferred correctly).

On top of that I had a CI flake on the first run. I changed the exact check because Claude Code's analysis was that the payload count is timing dependent so the same data can be split into more than one packet in certain cases "especially on Windows where the race detector has a higher overhead". The fact that we check the exact TotalBytesSent should be enough for coverage on "all data was sent", and having >= 1 (instead of >= 22) telemetry packets sent also checks that the library is sending data as expected. So I think this is OK.

@KowalskiThomas KowalskiThomas changed the title statsd: fix DD_EXTERNAL_ENV statsd: add missing originDetection for DistributionSample Apr 3, 2026
@KowalskiThomas KowalskiThomas changed the title statsd: add missing originDetection for DistributionSample statsd: add missing originDetection for DistributionSamples Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant