question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to set env tag

See original GitHub issue

All 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:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
liss-mousecommented, Mar 24, 2020

@bcaudan I have a similar question regarding datadogRum. How addRumGlobalContext is supposed to work? I can’t find my tags in Datadog. Maybe I’m just missing something from the documentation?

1reaction
bcaudancommented, Mar 25, 2020

There is on going work to improve the UI and the documentation on that front 🙂

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found