Skip to content
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

No way to set env tag #278

Closed
nirvdrum opened this issue Feb 19, 2020 · 6 comments
Closed

No way to set env tag #278

nirvdrum opened this issue Feb 19, 2020 · 6 comments
Labels
enhancement New feature or request logs rum

Comments

@nirvdrum
Copy link

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.

@bcaudan
Copy link
Contributor

bcaudan commented Feb 20, 2020

Hi @nirvdrum!
For now, we don't have an API to send tags directly from the browser SDK.
However, if you are using logs, you can configure a remapper to set an env tag from the env attribute.

@liss-mouse
Copy link

@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?

@bcaudan
Copy link
Contributor

bcaudan commented Mar 25, 2020

Hi @liss-mouse,

You can find addRumGlobalContext content in Datadog inside the events attributes.
From the explorer, inside the view side panel under the attributes tab.
From the analytics, by looking at a specific event.

@liss-mouse
Copy link

Thanks a lot, that helped 🙂 (DD interface is not that obvious for newbies 🙃)

@bcaudan
Copy link
Contributor

bcaudan commented Mar 25, 2020

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

@bcaudan bcaudan added the enhancement New feature or request label Apr 2, 2020
@bcaudan
Copy link
Contributor

bcaudan commented Aug 24, 2020

env tag is available since v1.11.5 with #392

@bcaudan bcaudan closed this as completed Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logs rum
Projects
None yet
Development

No branches or pull requests

3 participants