feat(telemetry): add gRPC transport for OTLP exporters - #266
Open
reyortiz3 wants to merge 8 commits into
Open
Conversation
Adds a Protocol field to otlp.Config and providers.Config (grpc alongside the existing http/protobuf default) so trace, metric, and log exporters can each be built against an OTLP/gRPC endpoint via otlptracegrpc/otlpmetricgrpc/otlploggrpc, selected through the new WithProtocol option. A signal-specific TracesProtocol override (WithTracesProtocol) lets traces use a different transport than metrics/logs, for setups that need to route traces and metrics/logs to different destinations with different transports. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
golang.org/x/crypto v0.55.0 (a pre-existing transitive dependency, pulled in via golang.org/x/crypto/ssh) is affected by GO-2026-6354 and GO-2026-6355, both fixed in v0.56.0. Bump the indirect requirement and re-tidy. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Resolve go.mod conflict: keep grpc as a direct dependency (used by the new otlptracegrpc/otlpmetricgrpc/otlploggrpc exporters) while taking main's newer golang.org/x/oauth2 v0.37.0 and google.golang.org/grpc v1.83.2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts: # go.mod
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.
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