Skip to main content
Log Drains automatically forward your application logs to an external destination in real time. Use the built-in Datadog integration or send NDJSON payloads to a custom HTTPS webhook.

Setting Up a Log Drain

  1. Go to Dashboard > Log Drains
  2. Click Create Log Drain
  3. Choose a destination and configure it:
  • Name — A label for this drain (for example, “Production logs”)
  • Site — The Datadog site for your organization
  • API Key — A 32-character Datadog API key
  • Service — The service name attached to each log (default: fal-log-drain)
  • Source — The source attached to each log (default: fal)
  • Tags — Optional comma-separated Datadog tags (for example, env:production,team:inference)
  • Sampling Rate — Maximum logs per delivery batch (1-5000, default: 1000)
fal stores the API key as a credential and sends it in the DD-API-KEY header. Never put an API key in an endpoint URL.
  1. Click Test to verify connectivity before saving
Log Drains require Admin role in your team. Only one log drain can be active per account.

Log Format

Webhook logs are delivered as NDJSON (newline-delimited JSON) via HTTP POST. Each line is a JSON object:

Fields

Every log line contains the core fields plus any available context labels. Fields beyond timestamp, message, and level are included only when the platform has a value for them. The Datadog integration sends the same fields through Datadog’s Logs API as JSON batches. It also adds the configured service, ddsource, and ddtags values and maps platform log levels to Datadog’s status field.

Verifying Webhook Signatures

Every webhook delivery includes an X-Fal-Signature header containing an HMAC-SHA256 signature of the request body, signed with your secret token. Use this to verify that deliveries are genuinely from fal.
Webhook deliveries use the Content-Type: application/x-ndjson header. Datadog deliveries use Content-Type: application/json.

Delivery Behavior

  • Logs are delivered in batches on a regular schedule
  • New drains start delivering logs from the last 30 seconds
  • The sampling rate controls the maximum number of log lines per batch
  • Deliveries time out after 10 seconds

Failure Handling

If your destination returns an error or is unreachable:
  • fal tracks consecutive failures
  • After 5 consecutive failures, the drain is automatically disabled
  • You can re-enable it from the dashboard after fixing the endpoint
  • The dashboard shows the failure count and last successful delivery time

Managing Log Drains

Manage your drain from the Dashboard. You can enable or disable it, test connectivity, update its destination settings or sampling rate, or delete it entirely. For a custom webhook, use an HTTPS endpoint you control that accepts NDJSON over HTTP POST. Keep credentials out of the endpoint URL; authenticate requests by verifying the X-Fal-Signature header instead.

Observability Overview

See all monitoring interfaces: dashboard, CLI, and integrations