No way to set env tag
See original GitHub issueAll of our logs going into Datadog are tagged by environment (path name env
). This tag is set up by the Datadog agents, so we don’t really have control over the path. I followed the documentation on setting up global context for logging, which sets the "env"
key:
datadogLogs.setLoggerGlobalContext({ env: 'custom-env-name', service: 'service-name' })
Unfortunately, this is coming into Datadog with path @env
, rather than env
. As such, the facet we’re using to segregate logs by environment doesn’t work. As far as I can tell, there’s nothing exposed in the API that would allow setting up this tag.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Define tags based on environment variables | Dynatrace Docs
Define tags as environment variables You can define an environment variable called DT_TAGS on the process or host level. The format of the...
Read more >How do I make use of environment variables on tags
As discussed, you need to move quotes outside tag value which makes sure environment variables are picked. Example - tag "raw.kubernetes.*.
Read more >Set Primary Tags to Scope - Datadog Docs
If you added a host tag other than env:<ENVIRONMENT> to your traces, it can be set as a primary tag along with the...
Read more >Environments - Tag Manager Help - Google Support
Configure how Tag Manager works between development and production server environments. The environments feature in Google Tag Manager is ideal for ...
Read more >Environment variables in Compose | Docker Documentation
How to set, use and manage environment variables in Compose. ... If an environment variable is not set, Compose substitutes with an empty...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bcaudan I have a similar question regarding
datadogRum
. HowaddRumGlobalContext
is supposed to work? I can’t find my tags in Datadog. Maybe I’m just missing something from the documentation?There is on going work to improve the UI and the documentation on that front 🙂