-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support configuring the client from environment variables #4
Comments
Hi, I can certainly take a look, don't know anything about containers or orchestration though unfortunately. Presumably that part doesn't matter the environment variable can be used regardless of it being in a container or not? At a quick glance, it sounds like what should happen in this case is if you call the constructor which doesn't specify the host and/or port, then it should read it from the environment variable Thanks Chris |
Hi, That's right, it is about the Thanks. |
Ah OK, so if the environment variable DD_ENTITY_ID is set also, then a tag called I can definitely look into implementing this, probably won't be able to test with the container side of things as not sure how they work so if you're OK to test that side of things when I've implemented it that would be great. Thanks Chris |
I think some unit tests mocking the Thanks. |
Hi, I've been implementing this but just need a little confirmation on something. Do you know if the I've implemented the code change with the name Do you know if this is right? Thanks Chris |
Hi Chris, Thanks for implementing the feature. What you are saying is correct, and it is because Please let me know if you have any other questions Thanks, |
That's great, I thought I was going mad :). I'm going to do a bit more testing I should be able to get a release out hopefully early next week. Thanks |
Hi Ahmed, I've just tagged 1.1.0.5 that adds support for setting the library up via environment variables. Let me know how you get on and if there's any issues. Thanks Chris |
Hi @boardy, Thank you for your work! 💯 Ahmed |
No problem Ahmed, glad to help. I'll close this issue off, but if there's any problems then please let me know. Thanks Chris |
All of the official Datadog dogstatsd clients can now be configured via standard environment variables. As the maintainer of the C++ 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: DataDog/datadog-go#78
Let me know if you have any questions about the code or the feature more generally.
Thanks,
Ahmed
The text was updated successfully, but these errors were encountered: