peepshow/ sinks/ datadog

Reel #32 Observability

peepshow sink / datadog

DatadogPOST every run as a Datadog event.

`/api/v1/events` with an aggregation key so repeat runs cluster under one event.

What it does

Surface peepshow runs on a Datadog event stream or incident timeline. The sink POSTs to `/api/v1/events`, uses `aggregation_key` to cluster repeat runs of the same clip, and supports all Datadog regions (`datadoghq.com`, `datadoghq.eu`, `us3`, `us5`, `ap1`).

When to reach for it

  • Tie video-processing failures to Datadog incident timelines
  • Tag events by `incident_id` / `env` via `DATADOG_EVENT_TAGS`
  • EU-region Datadog: set `DATADOG_SITE=datadoghq.eu`

Install

npm i -g peepshow

Use it

DATADOG_API_KEY=... \
DATADOG_EVENT_TAGS=env:prod,incident_id:IR-12 \
peepshow ./trigger.mp4 --sink datadog

Make it automatic

Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.

peepshow sinks add datadog
peepshow sinks add datadog --when extension=mp4,mov
peepshow sinks add datadog --when path=/Volumes/Work/

Configuration

  • DATADOG_API_KEY `DD-API-KEY` header. required
  • DATADOG_APP_KEY `DD-APPLICATION-KEY` — include when your setup requires it.
  • DATADOG_SITE Region. Default `datadoghq.com`.
  • DATADOG_EVENT_TAGS Comma-separated tags appended to the event.
  • DATADOG_ALERT_TYPE `info` | `warning` | `error` | `success`. Default `info`.

Use with an LLM agent

Every peepshow sink reads its config from env vars and receives a single JSON payload on stdin. An LLM agent (Claude Code, Cursor, Windsurf, Gemini, Codex) can drive the Datadog sink automatically when three things are true:

  • the env vars below are exported in the agent's shell (or a project .env it can load),
  • the peepshow CLI is on PATH — install with npm i -g peepshow,
  • a peepshow auto-sink is registered for the run (optional but recommended — makes invocation zero-argument).

1. Set the environment

# Add to ~/.zshrc, ~/.bashrc, or a project .env the agent can load
export DATADOG_API_KEY="..."

2. Register as an auto-sink

peepshow sinks add datadog
peepshow sinks add datadog --when extension=mp4,mov

3. Example LLM session

You → drop a .mov into Claude Code.

Claude → auto-invokes /peepshow:slides ./clip.mov. peepshow extracts frames + audio, the Datadog sink forwards the run to the alert / incident stream. Claude replies with a summary and a link to the created record.

Transcript metadata (language, duration, silence ratio) tags each event.

Write your own

A sink is any executable that reads the --emit json payload on stdin. Shell, Node, Python, Go — the spec's in docs/PLUGINS.md. Register persistent ones with peepshow sinks add-cmd 'your-command'.