fix(observability): translate OTEL_EXPORTER_OTLP_PROTOCOL to the transport enum#8
Merged
Merged
Conversation
…sport enum The bundled defaults bound OTEL_EXPORTER_OTLP_PROTOCOL straight to Spring's management.otlp.tracing.transport enum. The OTel spec values are grpc | http/protobuf | http/json, but the enum only accepts GRPC | HTTP, so the spec-correct http/protobuf failed to bind and crashed context initialization. FireflyObservabilityEnvironmentPostProcessor now normalizes any http/* protocol to the HTTP transport and, when HTTP is selected without an explicit endpoint, moves the default off the gRPC :4317 port to :4318/v1/traces (an explicit OTEL_EXPORTER_OTLP_(TRACES_)ENDPOINT always wins). The YAML now carries a static grpc default instead of the raw spec value.
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.
Problem
The bundled
application-firefly-observability.ymlboundOTEL_EXPORTER_OTLP_PROTOCOLdirectly to Spring'smanagement.otlp.tracing.transportenum. The OpenTelemetry spec values aregrpc | http/protobuf | http/json, but the Spring enum only acceptsGRPC | HTTP. Setting the spec-correcthttp/protobuftherefore failed to bind and crashed context initialization across every service consuming the framework.Fix
FireflyObservabilityEnvironmentPostProcessornow owns the translation:http/*protocol → transportHTTP;grpc→GRPC.:4317port to:4318/v1/traces. An explicitOTEL_EXPORTER_OTLP_(TRACES_)ENDPOINTalways wins.grpcdefault stands).The YAML now carries a static
grpcdefault instead of the raw spec value, so no invalid value ever reaches the enum binder.Tests
5 new cases in
FireflyObservabilityEnvironmentPostProcessorTest(http/protobuf, http/json, grpc, unset, explicit-endpoint-wins). Full class green (12/12).