Add OTLP protobuf ingest support#8
Open
sms-swe wants to merge 1 commit into
Open
Conversation
|
Can't comment on the code, but I'm running this branch locally and works well for me. Thanks! |
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
Adds support for binary OTLP protobuf ingest on the existing OTLP/HTTP trace and log endpoints.
Why
Motel currently accepts OTLP protobuf-JSON payloads, but many OpenTelemetry SDKs send binary protobuf by default. In particular, Go’s standard OTLP/HTTP exporters, such as
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp, default toContent-Type: application/x-protobuf.Without protobuf support, a default Go OpenTelemetry setup cannot send traces/logs to Motel without additional exporter configuration.
Changes
application/x-protobufandapplication/protobufrequests for:POST /v1/tracesPOST /v1/logsapplication/jsonprotobuf-JSON ingest behavior.Scope note
The runtime change is intentionally small: the ingest handlers now choose JSON vs protobuf decoding based on
Content-Type, then pass the resulting protobuf-JSON-shaped payload into the existing ingest path.The remaining file changes are supporting updates:
package.json/bun.lockadd the direct OTLP transformer dependency used for decoding the generated OTLP protobuf messages.Verification
bun run typecheckbun run test