Protobuf-only OTLP endpoint
The OTLP logs endpoint now rejects JSON with a clear 415, and the Docker log-shipping guide works as written.
/api/otlp/v1/logs now accepts only protobuf and returns 415 for JSON, instead of forwarding it to Quickwit and returning an opaque 400. The JavaScript guides now use @opentelemetry/exporter-logs-otlp-proto.
The Docker log-shipping guide had four problems: its self-exclusion filter never matched, the collector could not read container logs, the parser logged noisy errors, and it mounted an unused Docker socket. All four are fixed.
Before you upgrade
- If you use
@opentelemetry/exporter-logs-otlp-http, which sends JSON by default, switch to@opentelemetry/exporter-logs-otlp-proto.
Changelog
Changed
- OTLP endpoint is protobuf-only.
/api/otlp/v1/logsnow returns415forContent-Type: application/json(previously the request was forwarded and Quickwit returned an opaque400). Users of@opentelemetry/exporter-logs-otlp-http(which defaults to JSON) should switch to@opentelemetry/exporter-logs-otlp-proto. JavaScript integration guides (docs and admin UI) have been updated to use@opentelemetry/exporter-logs-otlp-proto.
Fixed
- Docker log-shipping guide (docs and
/administration/send-logs/docker). The previous OpenTelemetry Collector config relied on thecontaineroperator emittingcontainer.name, but thedockerformat only emitslog.iostreamand the parsed timestamp — so thefilter/exclude_selfprocessor never matched and the self-exclusion loop guard was a no-op. The config now derivescontainer.idfrom the log file path with atransformprocessor and matches the filter against${env:HOSTNAME}(Docker’s default short container ID) instead.service.namefalls back to the container ID when an app hasn’t set one itself. - Docker log-shipping guide — permission denied. Added
user: "0:0"to the collector compose service. Theotel/opentelemetry-collector-contribimage runs as UID 10001 by default, which cannot read/var/lib/docker/containers. - Docker log-shipping guide — noisy parser errors. Added
on_error: send_quietto thecontaineroperator. The operator’s k8s-metadata step runs a regex that matches only pod log paths and fails loudly on Docker paths; entries are still forwarded, but the error logs are now suppressed. - Docker log-shipping guide — dropped an unneeded Docker socket mount.
/var/run/docker.sockwas mounted in the compose snippet but never actually read by thecontaineroperator.