feat(datadog): add environment variable configuration#836
Merged
codeboten merged 3 commits intoopen-telemetry:masterfrom Jun 18, 2020
Merged
Conversation
toumorokoshi
approved these changes
Jun 17, 2020
Member
toumorokoshi
left a comment
There was a problem hiding this comment.
Awesome! Thanks for getting to this so quick.
| else os.environ.get("DD_TRACE_AGENT_URL", DEFAULT_AGENT_URL) | ||
| ) | ||
| self.service = service if service else os.environ.get("DD_SERVICE") | ||
| self.env = env if env else os.environ.get("DD_ENV") |
Member
There was a problem hiding this comment.
an empty string evaluates to false, so you may find that you cannot set that as a value (although I'm not sure what an empty string would do with regards to tag values anyway. It may not be valid).
also a shorthand for this is:
self.env = env or os.environ.get("DD_ENV") (evaluates to first non-falsey value)
aabmass
reviewed
Jun 17, 2020
| "DD_SERVICE": "test-service", | ||
| "DD_ENV": "test", | ||
| "DD_VERSION": "0.0.1", | ||
| "DD_TAGS": "team:testers", |
Member
There was a problem hiding this comment.
Doesn't look like there's any test coverage for multiple tags with , separators
Contributor
Author
There was a problem hiding this comment.
Thanks for the heads up, added it to one of the tests!
…g-unified-service-tagging
srikanthccv
pushed a commit
to srikanthccv/opentelemetry-python
that referenced
this pull request
Nov 1, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #824
Adds support for unified service tagging with environment variables
DD_SERVICE,DD_ENV,DD_VERSIONas well global tags with environment variableDD_TAGS.https://docs.datadoghq.com/tracing/setup/python/#configuration
https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging