Log in

Webhook drains

Webhook drains

A drain sends collection or view records to an external HTTPS endpoint. You can choose the body format, compression, headers, and whether to include existing records. A project can have up to 10 drains.

Set up a drain

  1. Open project Settings, then Drains.
  2. Click the plus button. The drawer is titled New drain.
  3. Select a collection or view, then provide a name, destination URL, optional headers, body format, compression, delivery schedule, and whether to backfill historical data.
  4. Create the drain.
  5. In Details, click Send verification. Find the tailglow_verify value at your endpoint and paste it back.
  6. The verified drain is paused. Use Send sample on its Activity tab if useful, then click Resume to begin delivery.

A sample sends the latest five eligible records with X-Tailglow-Test: true. It does not change where the drain is in its records.

Schedule

Choose how often the drain looks for new records: every minute, every 5 or 15 minutes, hourly, daily, or a custom cron expression. Schedules are evaluated in UTC, and new drains default to hourly. You can change the schedule at any time.

The schedule sets how quickly new records are picked up, not how fast a backlog clears. A drain that has fallen behind keeps sending until it catches up instead of waiting for its next run, so a large backfill is never limited by the schedule you choose.

A run that finds nothing to send makes no request, so a fast schedule adds no traffic to a quiet endpoint. It does change the shape of steady traffic: a drain receiving around 10 records a minute sends roughly 1,440 small requests a day on a per-minute schedule, against 24 larger ones on an hourly schedule. Choose whichever suits your destination.

Batches and retries

Each delivery contains at most 5,000 records and at most 5 MiB of uncompressed serialized data, except that a single oversize record is sent on its own. When a drain runs, Tailglow divides the records that arrived since its last run into batches. Batches are read, saved and sent in parallel, so deliveries can reach your endpoint out of order. Tailglow saves each request before sending it, and a retry sends the same saved bytes with the same X-Tailglow-Batch-Id.

A failed batch backs off on its own while the other batches keep going. Tailglow honors Retry-After with a delay between 30 seconds and 30 minutes, and when an endpoint asks to slow down or fails repeatedly, every delivery to it waits until the delay ends. A failed batch stays saved across pause, disable, and resume. Later successful batches do not hide an older failure: Tailglow warns team owners after six hours and disables the drain after 72 hours of unresolved failure. Explicitly resuming restarts this failure timer and retries failing batches at once.

The drain’s Activity tab shows when a failing batch is tried next and Delivered through: every record that arrived before that time has been delivered, and later records may be delivered too. It also shows how many batches are still waiting.

Receiver deduplication for saved batches

Treat X-Tailglow-Batch-Id as the identity of one fixed, ordered set of records. A timeout means Tailglow did not receive a complete response; your endpoint might already have accepted the request.

To avoid duplicate effects, atomically save the batch ID with your accepted records and return success for an ID already accepted. Retain that identity for as long as you allow drain retries or resumes. Do not return success for a duplicate that is still being processed unless its records are already durably accepted. The header alone does not prevent duplicates at a receiver that ignores or forgets it.

Changing fields or encoding

A change to excluded fields, format, or compression applies to every batch not yet prepared. Adding an exclusion also removes that field from batches already saved, before their next request. Restoring an excluded field affects only batches prepared after the change, because a saved body no longer contains that field. Format and compression changes repair a saved body too. A request already in progress may finish with its previous settings.

Repairs keep the same records, order, count, window headers, and batch ID. They never fill the freed space with additional records. At a receiver that deduplicates by ID, the first accepted representation wins; changing an exclusion does not edit records already accepted there. If your receiver rejects changed content under the same ID, that error remains visible and the batch keeps retrying.

Records removed before delivery

If the source’s retention removes records before their batch reads them, Tailglow sends the rest of the batch and carries on. The Activity tab counts those records as Expired before delivery. A drain that stays far behind its source can lose records this way, so keep it running and resume a paused drain before its records age out.

If Tailglow cannot tell where a drain stopped reading, it disables the drain instead of replaying history. Restore the missing source or create a new drain with the backfill choice you need.

Deleting a drain stops new requests and asynchronously removes its saved batches. A request already received by the destination cannot be recalled.

A drain runs on your project’s server, so while the project has no running server it shows Not running with the time it last ran.

Backfill

With Backfill historical data off, the drain starts from records arriving after its first activation. With it on, the drain catches up existing records before continuing with new ones. This choice cannot be changed after creation.

Draining to Tailglow

Point a drain at the destination project’s copied ingest endpoint and provide a destination ingest key. A trusted destination in the same project can skip marker verification, but two projects owned by the same team do not automatically verify each other. For a non-trusted destination, find the verification marker in the destination collection’s Records tab and confirm it in the drain drawer.

Security

Destinations must be public HTTPS addresses. Tailglow revalidates outbound addresses, rejects private and loopback targets, and times out each request after 30 seconds.