-
Notifications
You must be signed in to change notification settings - Fork 297
Description
Issue
The spec for OTLP/HTTP Response Failures states that the
The response body for all HTTP 4xx and HTTP 5xx responses MUST be a Protobuf-encoded Status message that describes the problem.
This contradicts the encoding text mentioned in OTLP/HTTP Response paragraph that suggests:
The server MUST use the same "Content-Type" in the response as it received in the request.
Is this just a mistake or is there a reason as to why the response body for all HTTP 4xx and 5xx responses must be protobuf-encoded?
Consequence
The OTLP http exporters used in the OpenTelemetry Collector seem to adhere to this spec and always attempt to parse the error responses (4xx - 5xx errors) using proto.Unmarshal
without checking the content-type.
This parsing fails when the server sets the content type as application/json
(IIUC, the exporters should use json.Unmarshal
to parse content-type application/json
).