Skip to main content
Send your logs to external observability platforms with built-in adapters. Each adapter is a regular transport — batched, retried, and non-blocking — so you can mix them with console and file logging or run them exclusively.

Available Adapters

Cloud Platforms

Self-Hosted & Open Standards

Quick Start

Set the platform’s environment variables, create the transport, and pass it to transports:
Trigger a request and the access log appears in your platform’s log explorer.

Shared Behavior

All adapters share the same core:
  • Batching — entries buffer and flush either when maxBatchSize is reached (default 20) or after flushIntervalMs (default 2000 ms), whichever comes first.
  • Retries — network errors, 429, and 5xx responses retry with linear backoff (default 2 retries). Other 4xx responses fail immediately.
  • Timeout — each request aborts after timeout ms (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.
Every adapter accepts these options on top of its platform-specific ones:

Multiple Destinations

Adapters compose — fan the same logs out to several platforms:

Production-Only External Logging

Use useTransportsOnly 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.