Conversation
ApplicationSignalsProcessor relies on the resource attribute `deployment.environment` as a customer-provided override for ApplicationSignals `Environment`. However, `deployment.environment` has been deprecated and replaced with `deployment.environment.name` in the upstream. In this PR, we are adding support for the new attribute, while maintaining support for the old attribute, since customers may still specify `deployment.environment`, for example, if they are running on older OTEL versions. Callout: We are no longer getting these attribute names from semconv as: 1. We were relying on go.opentelemetry.io/collector/semconv/v1.22.0, which does not have `deployment.environment.name` 2. https://pkg.go.dev/go.opentelemetry.io/collector/semconv has been deprecated 3. It's replacement, https://pkg.go.dev/go.opentelemetry.io/otel/semconv does not include `deployment.environment.name`: https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-go+deployment.environment.name&type=code 4. Nor does it include `deployment.environment` in the latest releases (1.3x): https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-go+deployment.environment&type=code So we hardcode these attributes within the processor logic.
bjrara
approved these changes
Jun 11, 2025
mxiamxia
approved these changes
Jun 11, 2025
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.
Description of the issue
ApplicationSignalsProcessor relies on the resource attribute
deployment.environmentas a customer-provided override for ApplicationSignalsEnvironment. However,deployment.environmenthas been deprecated and replaced withdeployment.environment.namein the upstream.Description of changes
In this PR, we are adding support for the new attribute, while maintaining support for the old attribute, since customers may still specify
deployment.environment, for example, if they are running on older OTEL versions.Callout: We are no longer getting these attribute names from semconv as:
deployment.environment.namedeployment.environment.name: https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-go+deployment.environment.name&type=codedeployment.environmentin the latest releases (1.3x): https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-go+deployment.environment&type=codeSo we hardcode these attributes within the processor logic.
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
export OTEL_RESOURCE_ATTRIBUTES="service.name=2122Test1"- Success,Environmentmetric dimension set toec2:default.export OTEL_RESOURCE_ATTRIBUTES="service.name=2122Test1,deployment.environment=test1"- Success,Environmentmetric dimension set totest1.export OTEL_RESOURCE_ATTRIBUTES="service.name=2122Test1,deployment.environment.name=test2"- Success,Environmentmetric dimension set totest2.export OTEL_RESOURCE_ATTRIBUTES="service.name=2122Test1,deployment.environment=test3,deployment.environment.name=test4"- Success,Environmentmetric dimension set totest4. // Not a realistic test, just edge testing.export OTEL_RESOURCE_ATTRIBUTES="service.name=2122Test1,deployment.environment.name=test5,deployment.environment=test6"- Success,Environmentmetric dimension set totest5. // Not a realistic test, just edge testing.Requirements
Before commiting your code, please do the following steps.
make fmtandmake fmt-shmake lintDone
Integration Tests
To run integration tests against this PR, add the
ready for testinglabel.