dogstatsd-elixir icon indicating copy to clipboard operation
dogstatsd-elixir copied to clipboard

Support configuring the client from environment variables

Open ahmed-mez opened this issue 6 years ago • 2 comments
trafficstars

All of the official Datadog dogstatsd clients can now be configured via standard environment variables. As the maintainer of the elixir dogstatsd library, could you port the same functionality to this client? We would prefer that configuration be consistent across client libraries.

Sample changes from the Go implementation can be found here: https://github.com/DataDog/datadog-go/pull/78

Let me know if you have any questions about the code or the feature more generally.

Thanks,

Ahmed

ahmed-mez avatar Mar 20 '19 15:03 ahmed-mez

@ahmed-mez the client has already supported this feature

Please see https://github.com/adamkittelson/dogstatsd-elixir/blob/e56ec360e73fa97b031c54b2337ebc72578e0389/lib/dogstatsd.ex#L45

and

https://github.com/adamkittelson/dogstatsd-elixir/blob/e56ec360e73fa97b031c54b2337ebc72578e0389/lib/dogstatsd.ex#L45

The naming of the variables are different to that of Go though

runlevel5 avatar Apr 08 '19 05:04 runlevel5

@joneslee85 thank you for mentioning that. The PR it is about the DD_ENTITY_ID env var also, if set, it would be very useful to add it as a tag with the tag name dd.internal.entity_id to identify the kubernetes pod later in the server.

Thanks.

ahmed-mez avatar Apr 08 '19 08:04 ahmed-mez