ExportLogsServiceRequest JSON — an OpenTelemetry Collector, Grafana Cloud, New Relic, Honeycomb, SigNoz, or any other OTLP-compatible backend. If your platform speaks OTLP and doesn’t have a dedicated adapter, this is the one to use.
Setup
- Find your backend’s OTLP/HTTP endpoint and auth headers (for a local collector this is
http://localhost:4318and usually no auth). - Set the standard OpenTelemetry environment variables:
- Wire the transport:
Environment Variables
The adapter honors the standard OpenTelemetry exporter variables:
* One of the two endpoint variables (or the
endpoint option) is required.
Options
Plus the shared batching options:
maxBatchSize, flushIntervalMs, timeout, retries — see the overview.
Payload
Logs post to{endpoint}/v1/logs. Levels map to OpenTelemetry severity numbers (DEBUG → 5, INFO → 9, WARNING → 13, ERROR → 17), and meta fields flatten into dot-notation attributes (request.method, status, durationMs, context.requestId, …).
Pair this with logixlysia/otel to include context.trace_id / context.span_id and correlate logs with traces in your backend.
Vendor Examples
Grafana Cloud (OTLP gateway):Troubleshooting
404— the endpoint should be the base URL only; the adapter appends/v1/logsitself.401/403— check the header format inOTEL_EXPORTER_OTLP_HEADERS; values must not be URL-encoded.- Nothing arrives — logs flush in batches (2 s by default); call
flush()before short-lived processes exit.