The two environments
Click the ⓘ next to a source in the sidebar to see its values under Env match and whether it is the default under Default for org. You can read these values but not change them.
Send data to an environment
Set theenv resource attribute on every exporter, once per deployment of a service:
resource processor on that page shows how.
Matching is exact and case-sensitive. prod and production reach Prod. Prod, PROD, production with a trailing space, and staging match nothing.
How Sherlock picks the label
A sender can carry several environment attributes, because some libraries set one of their own. Sherlock copies the first of these that is present intosherlock.env and routes on that:
Why
env ranks above the OpenTelemetry names: some libraries add deployment.environment on their own, often with the value production. When env is set, Sherlock ignores that value and the data goes where env says. When env is not set, the library’s value decides, and production sends the data to Prod. If a library in your stack sets env itself, set sherlock.env on the exporter; it ranks above everything.
What happens when nothing matches
A value that matches no environment, or a sender with no environment attribute at all, lands in Prod, the default. There is no warning. If a service is missing from Dev, look in Prod first.Troubleshooting
Dev data shows up in Prod
Dev data shows up in Prod
One of three things: the value is not one of Dev’s accepted values, the case differs, or that sender has no
env attribute. Check the ⓘ dialog on the Dev source for its values, then the sender’s OTEL_RESOURCE_ATTRIBUTES.Everything shows up in Prod
Everything shows up in Prod
No sender sets an environment attribute, so all data falls to the default. Add
env to each exporter.A library sets its own environment
A library sets its own environment
Set
env; it takes precedence over deployment.environment.name and deployment.environment. If the library sets env itself, set sherlock.env, which always wins.I need a third environment
I need a third environment
Environments and their accepted values are not editable from the app or the API. Contact Sherlock to add one.
Related topics
Get started
Choose the env value as part of first setup.
OpenTelemetry SDKs and collectors
Set the attribute on any SDK or in a collector.

