Sinks

Sinks overview

Sinks are where events leave evlog — built-in drain adapters, custom drains, the drain pipeline (batch + retry + fanout), and identity headers.

A sink is anything that receives a wide event and does something terminal with it: ship to a provider, write to disk, send to a queue, post to a webhook. evlog ships built-in adapters for popular providers (Adapters overview) — this section is for everything beyond that.

You touch sinks when:

  • You want to send events to a backend that has no built-in adapter
  • You want to combine several drains with batching, retry, and fanout
  • You want receivers to identify evlog traffic by User-Agent / X-Evlog-Source

Pages here

WhatWhen
Custom drainsdefineDrain() and defineHttpDrain() — write your ownYou ship to a backend without a built-in adapter
Drain pipelinecreateDrainPipeline() — batch + retry + buffer + fanoutYou hit any provider in production at non-trivial volume
Identity headersUser-Agent: evlog/<version> + X-Evlog-Source on every requestYou want to recognize evlog traffic in your provider's UI
Fanout & multi-drainRecipe combining the pipeline with several drains in parallelYou want events to reach Axiom AND Datadog AND Sentry AND fs

Going further

Once you have a custom drain that's worth sharing across projects, package it as an npm library.