Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WithoutOriginDetection option is not working #312

Open
radykal-com opened this issue Jul 29, 2024 · 2 comments
Open

WithoutOriginDetection option is not working #312

radykal-com opened this issue Jul 29, 2024 · 2 comments

Comments

@radykal-com
Copy link

We just noticed some of our applications where not reporting metrics when running in a docker container.
After looking at the process receiving the metrics we saw it was complaining because it was receiving the new "container-id" tag after the metric tags.
Example:
metric_name:1|c|c:in-2123553

After checking what was causing this we found it was this library with that new feature.
Creating the StatsDWriter with the WithoutOriginDetection should disable this and stop sending it but it's not.
The WithoutOriginDetection description says

// WithoutOriginDetection disables the client origin detection.
// When enabled, the client tries to discover its container ID and sends it to the Agent
// to enrich the metrics with container tags.
// Origin detection can also be disabled by configuring the environment variabe DD_ORIGIN_DETECTION_ENABLED=false
// The client tries to read the container ID by parsing the file /proc/self/cgroup, this is not supported on Windows.
// The client prioritizes the value passed via DD_ENTITY_ID (if set) over the container ID.

In the same server running the application container there is a datadog agent running (v7.54) but that server is not the destination for the statsD metrics sent by the app. It's another process in another server, which is compatible with the old version of the dogstatsd format but not with this new one.

What is correct way to disable this feature at the application using the StatsDWriter?

@carlosroman
Copy link
Contributor

Thanks for pointing this out. I think earlier versions of the code were ignoring that flag and still sending the container ID. What version of our library are you using?

@radykal-com
Copy link
Author

We are using v5.5.0 I think it's the latest one

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

No branches or pull requests

2 participants