Pin OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf#62
Conversation
…d exporter
The Dockerfile installs only the HTTP variant of the OTLP exporter
(opentelemetry-exporter-otlp-proto-http), but opentelemetry-instrument
defaults the protocol to grpc per the OTel spec. Without this pin
the wrapper fails at startup:
RuntimeError: Requested component 'otlp_proto_grpc' not found
in entry point 'opentelemetry_traces_exporter'
Failed to auto initialize OpenTelemetry
The OTel SDK then doesn't initialise — manual span calls succeed
silently as no-ops, so the milter looks healthy but no traces ship.
Verified locally: docker build + docker run with
`opentelemetry-instrument python3 -c '...'` now starts cleanly
with the protocol pin; the three auto-instrumentations attach as
expected.
Greptile SummaryThis PR fixes a runtime startup failure when Confidence Score: 5/5Safe to merge — fixes a definite runtime failure with no regressions; all findings are P2 or lower. The change is minimal, well-commented, and directly fixes a documented startup error. The No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant E as entrypoint.sh
participant SDK as opentelemetry-instrument
participant Exp as OTLP HTTP Exporter
E->>E: OTEL_TRACING_ENABLED=true
E->>E: export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf (default)
E->>SDK: exec opentelemetry-instrument python3 milter.py
SDK->>SDK: reads OTEL_EXPORTER_OTLP_PROTOCOL
SDK->>Exp: loads opentelemetry-exporter-otlp-proto-http
Exp-->>SDK: exporter ready
SDK-->>E: process starts, traces ship to OTLP endpoint
Reviews (1): Last reviewed commit: "OTel: pin OTEL_EXPORTER_OTLP_PROTOCOL=ht..." | Re-trigger Greptile |
Summary
opentelemetry-instrumentdefaults OTLP exporter protocol to grpc per the OTel spec, but the Dockerfile installs only the HTTP exporter. Without an explicit pin, runtime startup fails with:The SDK then doesn't initialise — manual span calls become no-ops, the milter looks healthy, but no traces ship. Setting
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf(with:-so a deployer can still override) selects the right exporter.Verified
Test plan
INSTALL_OTEL=trueand runopentelemetry-instrument— nootlp_proto_grpc not founderror.OpenTelemetry tracing enabled (... protocol=http/protobuf).