ExportLogsServiceRequest). Works with HyperDX cloud and self-hosted collectors alike, and meta fields arrive as searchable log attributes.
Setup
- Copy the ingestion API key from your HyperDX team settings.
- Set the environment variable:
- Wire the transport:
- Trigger a request and search the logs in the HyperDX UI.
Environment Variables
Options
Plus the shared batching options:
maxBatchSize, flushIntervalMs, timeout, retries — see the overview.
Payload
Logs post to{endpoint}/v1/logs as OTLP JSON. Levels map to OpenTelemetry severity numbers (DEBUG → 5, INFO → 9, WARNING → 13, ERROR → 17), and meta fields flatten into dot-notation attributes:
Pair this with
logixlysia/otel to include context.trace_id / context.span_id and correlate logs with traces.
Self-Hosted Collectors
Pass the OTLP HTTP base URL only (port 4318 by default) — the adapter appends/v1/logs:
Troubleshooting
401— the API key is wrong; use the ingestion key, not a personal API key.- Nothing arrives — logs flush in batches (2 s by default); call
flush()before short-lived processes exit.