Skip to content

feat(telemetry): add gRPC transport for OTLP exporters - #266

Open
reyortiz3 wants to merge 5 commits into
mainfrom
feat/otlp-grpc-transport
Open

feat(telemetry): add gRPC transport for OTLP exporters#266
reyortiz3 wants to merge 5 commits into
mainfrom
feat/otlp-grpc-transport

Conversation

@reyortiz3

Copy link
Copy Markdown
Contributor

Summary

  • 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

🤖 Generated with Claude Code

reyortiz3 and others added 5 commits September 2, 2026 15:53