Available Adapters
Cloud Platforms
Self-Hosted & Open Standards
Quick Start
Set the platform’s environment variables, create the transport, and pass it totransports:
Shared Behavior
All adapters share the same core:- Batching — entries buffer and flush either when
maxBatchSizeis reached (default 20) or afterflushIntervalMs(default 2000 ms), whichever comes first. - Retries — network errors,
429, and5xxresponses retry with linear backoff (default 2 retries). Other4xxresponses fail immediately. - Timeout — each request aborts after
timeoutms (default 5000). - Non-blocking — sends run in the background and never delay your HTTP responses. Failures are reported through
onError(sink'transport') or rate-limited to stderr. - Credentials — read from environment variables by default; options passed to the factory always win. Missing credentials throw at startup with an actionable message, not silently at runtime.
Multiple Destinations
Adapters compose — fan the same logs out to several platforms:Production-Only External Logging
UseuseTransportsOnly to disable console and file output and send logs exclusively to your platform:
Graceful Shutdown
Batching timers never keep the process alive, so flush pending entries before exit.beforeExit alone does not fire on SIGTERM/SIGINT, so handle those too:
What Gets Sent
Each log carries its level, message, and the full meta object: the request method and URL, the response status,durationMs, and everything merged into the request context — request IDs, trace IDs, user IDs, and your own fields. Platforms that prefer flat attributes (HyperDX, Sentry, PostHog) receive dot-notation keys like request.method and context.requestId; Axiom receives the nested structure as-is.
Redaction runs before transports, so autoRedact and redactKeys apply to everything an adapter ships off-box.