You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds gRPC as an alternative OTLP transport (alongside the existing HTTP/protobuf-only support) in telemetry/providers.
otlp.Config and providers.Config gain a Protocol field (http, the existing default, or grpc); the trace, metric, and log exporters each branch on it to build against otlptracegrpc / otlpmetricgrpc / otlploggrpc instead of the *http variants.
Adds a WithProtocol option to select the transport, and a signal-specific TracesProtocol override with WithTracesProtocol, for setups where traces need a different transport than metrics/logs (e.g. routing them to different destinations).
Motivation
A downstream consumer, ai-gateway in stacklok-enterprise-platform, needs to reach its existing in-cluster OTel Collector over gRPC and currently can't migrate onto this package without gRPC support — today telemetry/providers only supports OTLP/HTTP.
Verification
Ran on the feature branch before opening this PR:
task lint # golangci-lint run --allow-parallel-runners ./... -> 0 issues; go vet ./... -> clean
task test# go test -race ./... -> all packages pass
go build ./... # clean
Summary
telemetry/providers.otlp.Configandproviders.Configgain aProtocolfield (http, the existing default, orgrpc); the trace, metric, and log exporters each branch on it to build againstotlptracegrpc/otlpmetricgrpc/otlploggrpcinstead of the*httpvariants.WithProtocoloption to select the transport, and a signal-specificTracesProtocoloverride withWithTracesProtocol, for setups where traces need a different transport than metrics/logs (e.g. routing them to different destinations).Motivation
A downstream consumer,
ai-gatewayinstacklok-enterprise-platform, needs to reach its existing in-cluster OTel Collector over gRPC and currently can't migrate onto this package without gRPC support — todaytelemetry/providersonly supports OTLP/HTTP.Verification
Ran on the feature branch before opening this PR:
🤖 Generated with Claude Code