Uh oh!
There was an error while loading. Please reload this page.
feat(telemetry): support OTLP HTTP transports - #95
Merged
Conversation
danielkovforce-pushed
the
feat/otel-http-transports
branch
from
September 3, 2026 12:37
1d2ce74 to
44ae111Comparedanielkov
enabled auto-merge (squash)
September 3, 2026 12:38
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
Add configurable OTLP trace export over gRPC, HTTP/protobuf, and HTTP/JSON. Expose protocol selection through CLI, TOML, and standard OpenTelemetry environment variables, and propagate the resolved transport to nested Kit processes.
Motivation
OTLP collectors such as Gram expose standard HTTP trace ingestion endpoints rather than gRPC. Supporting both HTTP encodings lets Kit export its existing GenAI spans directly to those collectors.
Impact
OTLP/gRPC remains the default, so existing configurations retain their current transport. HTTP configurations treat
otel_endpointas a base endpoint and append/v1/traceswhen needed; trace export remains disabled when no endpoint is configured.Technical details
Configuration precedence
Protocol resolution uses CLI, then
config.toml, thenOTEL_EXPORTER_OTLP_TRACES_PROTOCOL, thenOTEL_EXPORTER_OTLP_PROTOCOL, and finally the gRPC default.kit initleaves the protocol unset so environment selection remains effective.HTTP export
The HTTP exporters preserve the standard generic and trace-specific OTLP header variables. The implementation enables the pinned OpenTelemetry HTTP protobuf and JSON features and reuses Kit's existing reqwest/rustls client stack.
Batch processing
HTTP transports use the SDK Tokio-backed batch span processor so the async reqwest exporter is driven by a compatible runtime. gRPC retains the existing thread-backed batch processor.
HTTP shutdown is independently bounded to five seconds so a stalled collector cannot delay Kit exit beyond the provider deadline.