Repository navigation
feat(otel): add deployment.environment.name from service_environment to the resource - #353
Merged
Merged
Conversation
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.
Closes #332.
service_environmentreached Sentry but not the OTel resource._build_resourcenow setsdeployment.environment.namefrom it, and the existingif vfilter leaves the key out whenservice_environmentis unset.The key is a string literal. Its stable constant first appears in semconv 0.63b0, and at the 1.28 floor it exists only in
_incubating.resources.DEPLOYMENT_ENVIRONMENTholds the old"deployment.environment"key, so it is not used.Additive, so it fits a minor. One edge for the release notes: lite-bootstrap's attributes are merged over
OTEL_RESOURCE_ATTRIBUTES, so a service that sets bothservice_environmentanddeployment.environment.namein that variable now gets the config value.Tests: a parametrized test covers the set and unset cases on the tracer provider's resource, and the metrics-endpoint test now checks that the meter provider's resource carries the key too. Both failed before the change. Full suite passes at 100% coverage;
just lintis clean.