What it does
Ship peepshow runs to the New Relic Events API as `PeepshowRun` custom events so they're queryable via NRQL alongside the rest of your telemetry. Attributes are flattened to camelCase alphanumerics (New Relic forbids dots), container tags land as `videoTag<Key>`, and both US + EU endpoints are supported.
When to reach for it
- Chart peepshow frequency, latency, or failure rate via NRQL
- Correlate video-processing runs with APM / browser / log data already in NR
- EU-region accounts: set `NEW_RELIC_REGION=eu`
Install
npm i -g peepshowUse it
NEW_RELIC_INSERT_KEY=... \
NEW_RELIC_ACCOUNT_ID=1234567 \
peepshow ./trigger.mp4 --sink newrelicMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add newrelic
peepshow sinks add newrelic --when extension=mp4,mov
peepshow sinks add newrelic --when path=/Volumes/Work/Configuration
NEW_RELIC_INSERT_KEYEvents API Insert Key. Sent as the `Api-Key` header. requiredNEW_RELIC_ACCOUNT_IDNumeric account id in the endpoint path. requiredNEW_RELIC_REGION`us` | `eu`. Default `us`. Unknown values clamp to `us`.NEW_RELIC_EVENT_TYPEOverride for `eventType`. Default `PeepshowRun`.NEW_RELIC_API_URLFull endpoint override (proxies / tests). Used verbatim.
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 New Relic sink automatically when three things are true:
- the env vars below are exported in the agent's shell (or a project
.envit can load), - the
peepshowCLI is onPATH— install withnpm 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 NEW_RELIC_INSERT_KEY="..."
export NEW_RELIC_ACCOUNT_ID="..."2. Register as an auto-sink
peepshow sinks add newrelic
peepshow sinks add newrelic --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theNew Relicsink 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'.