datadog-go icon indicating copy to clipboard operation
datadog-go copied to clipboard

DD_TAGS env var support

Open pedro-stanaka opened this issue 4 years ago • 2 comments

Summary

This PR fixes issue #223 and it is something that I am also interested in using. I hope this is the correct implementation for the problem.

pedro-stanaka avatar Dec 01 '21 14:12 pedro-stanaka

@hush-hush I know you had self-assigned issue #223 to you, so maybe you want to give me a review here? Thanks in advance!

pedro-stanaka avatar Dec 06 '21 10:12 pedro-stanaka

Hi @pedro-stanaka ,

Thanks for opening this PR. Adding support for DD_TAGS across all our DogStatsD clients is something we're looking into.

The main issue being that when DD_TAGS is set for the whole host and the agent/client are running locally it will be picked by both, so we have to be careful. This is especially important when using containers, VMs or k8s deployments. The last thing we want is for the clients or Agent to assign the wrong tags to a metric by default.

We're also looking into aligning the behavior between all clients around this, which is a bit all over the place right now.

In the meantime, clients that want to fetch tags from the env can easily do so using the library constructor. It's not the best but it's an easy workaround.

hush-hush avatar Dec 08 '21 14:12 hush-hush