Skip to content

Protobuf - #3

Merged
platypii merged 3 commits into
masterfrom
protobuf
Apr 23, 2026
Merged

Protobuf#3
platypii merged 3 commits into
masterfrom
protobuf

Conversation

@platypii

@platypii platypii commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Add OTLP/HTTP protobuf support

  • Accept Content-Type: application/x-protobuf on /v1/{traces,metrics,logs} alongside existing JSON, returning protobuf responses for protobuf requests
  • Add zero-dependency protobuf wire-format codec (src/protobuf.js) — varint, fixed32/64, length-delimited, zigzag — no .proto files or generated code
  • Add OTLP decoders for traces, metrics (all data point types: gauge/sum/histogram/exponential-histogram/summary), and logs, plus shared Resource/InstrumentationScope/AnyValue helpers under src/otlp/
  • Decoded protobuf payloads flow through the same handler(signal, data) path as JSON, so Collector writes them to the same <signal>.jsonl files with no further changes
  • Malformed protobuf → 400; unknown content types → 415 with updated error message
  • Tests: test/protobuf.test.js (wire format), test/otlp.test.js (decoders, ~430 lines), plus server-level coverage for the protobuf path

@platypii
platypii requested a review from philcunliffe April 23, 2026 18:25
@platypii
platypii merged commit 3c5784c into master Apr 23, 2026
6 checks passed
@platypii
platypii deleted the protobuf branch April 23, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants