Skip to main content
Log export pushes a function’s logs to an external endpoint over HTTPS as they happen, instead of only being readable with logs. Logs are delivered in OpenTelemetry OTLP format, so any OTLP-compatible destination works: Honeycomb, Datadog, Grafana, or your own OpenTelemetry Collector.

Requirements

Requires CLI v0.5.3 or newer.
Log export is configured per function with the log-export command family. One function has at most one destination; setting a new one replaces the old one.

Configure export

log-export set is a full replace, not a patch: each call configures the destination from scratch, replacing any previous configuration for that function. Which log types get exported follows the same presence convention as logs --type:

Inspect export configuration

Shows the configured destination endpoint and which log types are exported. Headers are never shown. With --json, the result is {"configured": true, "data": {...}}, or {"configured": false, "data": null} when nothing is configured.

Stop exporting

Stops exporting a function’s logs. Idempotent: deleting when nothing is configured succeeds.

How delivery works

  • Delivery is continuous and near-real-time. Each new log line is converted to an OTLP log record and pushed as it happens — it is not a periodic batch or a one-time dump.
  • Export is a fan-out from storage, not a replacement for it. Configuring export never stops logs from also being stored and readable with logs; a temporarily unreachable destination does not lose stored logs. Export retries with a bounded retry policy.
  • Runtime and invocation logs can both be exported to the same destination, interleaved. Each record carries the function’s identity so records route to the correct destination.
  • No history replay. Export begins with logs generated after the destination is configured.

Security notes

  • The endpoint must be HTTPS.
  • Header values (such as collector auth tokens) are encrypted at rest and never returned by the API or CLI.
  • Export the minimum you need: invocation records contain request metadata (method, path, status, sizes, region), and runtime logs contain whatever your code prints. Do not log sensitive payloads.
See the CLI reference for the full command reference.