Skip to content

OTLP/HTTP logs endpoint returns 200 OK without Content-Type header #119004

Description

@antonlorani

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Send a request to the OTLP/HTTP logs export endpoint

POST https://<org_id>.ingest.de.sentry.io/api/<project_id>/integration/otlp/v1/logs
Content-Type: application/x-protobuf
x-sentry-auth: sentry sentry_key=...
...

Expected Result

Per OTLP specs:

The server MUST set “Content-Type: application/x-protobuf” header if the response body is binary-encoded Protobuf payload. The server MUST set “Content-Type: application/json” if the response is JSON-encoded Protobuf payload. The server MUST use the same “Content-Type” in the response as it received in the request.

TL;DR the Content-Type field MUST BE present in the response headers, even if the response has no response body.

Actual Result

Currently responds with a

200 OK
Content-Length: 0
...

The required Content-Type header is missing.

Product Area

Ingestion and Filtering

Link

https://<org_id>.ingest.de.sentry.io/api/<project_id>/integration/otlp/v1/logs

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Waiting for: Support

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions