Skip to main content
Send logs to any OTLP/HTTP logs endpoint as standard 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

  1. Find your backend’s OTLP/HTTP endpoint and auth headers (for a local collector this is http://localhost:4318 and usually no auth).
  2. Set the standard OpenTelemetry environment variables:
  1. 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):
New Relic:
Local collector — point at port 4318 and let the collector fan out:

Troubleshooting

  • 404 — the endpoint should be the base URL only; the adapter appends /v1/logs itself.
  • 401 / 403 — check the header format in OTEL_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.