-
Notifications
You must be signed in to change notification settings - Fork 41.1k
OtlpMetricsPropertiesConfigAdapter does not merge user's attributes with OTEL_RESOURCE_ATTRIBUTES #44400
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
Comments
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
3.4.x...nosan:spring-boot:44400 includes a fix for this issue. The |
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Introduce OpenTelemetryResourceAttributes to merge user-defined resource attributes with those from OTEL_RESOURCE_ATTRIBUTES. See spring-projectsgh-44400 Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
I’m a bit confused, to be honest. Just to clarify, would you like to include merge support for The focus of #43712 is on |
Yeah, I would include spec-compliant proper handling of |
According to the OpenTelemetry specification (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable),
OTEL_RESOURCE_ATTRIBUTES
must always be merged with the user-provided attributes.Currently,
OtlpMetricsPropertiesConfigAdapter
uses the user's attributes if they are provided; otherwise, it falls back to the attributes from OTEL_RESOURCE_ATTRIBUTES.https://github.com/nosan/spring-boot/blob/fdcc8d9d1f632f00dd71093d604c374b6d0a38d3/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/otlp/OtlpMetricsPropertiesConfigAdapter.java#L79-L87
As I understand it, the logic should be:
The text was updated successfully, but these errors were encountered: