fix(opentelemetry source): preserved decoding rejects valid default empty protobuf exports
Observed behavior
With the official Linux amd64 Vector0.60.0 Debian image and decoding.codec: otlp, POSTing a valid default OTLP request (zero protobuf bytes, Content-Type: application/x-protobuf) returns HTTP400. Repeating it has the same result. This occurs on /v1/traces, /v1/logs and /v1/metrics.
An explicit empty resource envelope (0a00) or scope envelope (0a021200) returns200. These forms also contain zero telemetry records. Truncated protobuf (80) correctly returns400 and must remain a different case.
Expected behavior
The OTLP specification says receivers SHOULD respond with success to requests containing no telemetry. Its empty-envelope guidance permits dropping empty envelopes. A correct local no-op response should not fabricate a span, enqueue a record or establish backend readiness/persistence.
Reproduction and evidence
Executed synthetic controls use this immutable public image:
timberio/vector:0.60.0-debian@sha256:73f0cd0e2c52f5d1f7bad12b1f3f2e9dbb375b469eec8c77fb5ae35c58a8a6d2
data_dir: /data
sources:
otel:
type: opentelemetry
decoding:
codec: otlp
http:
address: 0.0.0.0:4318
grpc:
address: 0.0.0.0:4317
sinks:
discard:
type: blackhole
inputs: [otel.traces, otel.logs, otel.metrics]
For an instance using that configuration:
curl -i -X POST -H 'Content-Type: application/x-protobuf' --data-binary '' http://127.0.0.1:4318/v1/traces
The linked job succeeds because it asserts the original rejection; it is not a passing interoperability result. It exercises HTTP source admission with only synthetic inputs, without an external backend. gRPC has not been exercised by that job.
Source analysis and proposed direction
The selected preserved decoder requires a resource-field discriminator that is absent from a valid default message. The signal-specific endpoint already knows which request type to decode. A focused fix can decide actual record cardinality after complete typed decoding and existing admission/body/decompression controls, return a canonical no-op response for zero records and preserve the existing nonempty representation. Malformed input and nonempty rejected data must stay distinct.
Related: #26025 distinguishes gRPC health checking from empty export handling; #26456 tracks HTTP JSON requests receiving500. JSON {} is a valid default request, while an absent JSON document is malformed. Protobuf no-op handling alone does not establish JSON support.
This investigation and source draft were prepared with GPT-6.1-Sol; the observed responses above come from the linked isolated public workflow.