Payloads & Logs

Drumbeats payloads attach context to a ping — error output, structured data, metrics. Hot vs spilled storage, Beats accounting, and operational guidance.

A Drumbeats payload is the optional body attached to a ping — error output, structured data, or metrics that help an on-call engineer triage a failed run without leaving the dashboard. Payloads are stored alongside the ping on the run timeline and rendered inline in the monitor's history view. log events are pings whose only purpose is to carry a payload — they record progress without changing monitor status.

For the HTTP-level reference (parameters, methods, size limits per plan) see Ping API — Payloads; this page covers the conceptual model and the storage tiers.

Storage tiers

TierSizeWhereRead latency
HotFirst 10 KBPrimary databaseInstant — renders inline in the dashboard.
Extended10 KB → plan ceilingObject storage (S3 / R2)Fetched on-demand; a small delay the first time the payload is opened.

Both tiers count as one payload from the Beats accounting perspective — see Beats & usage for the formula. Payload bytes are metered from the first byte regardless of storage tier; the 10 KB threshold only affects where the payload lives and how fast it loads.

Sending structured logs

The log event is the natural fit for progress data. Use a JSON body so the dashboard renders fields as a key/value table rather than a raw string.

bash
curl -X POST https://api.drumbeats.io/v1/ping/<monitor-id>/log \
  -H "Content-Type: application/json" \
  -d '{
    "level": "info",
    "message": "sync in progress",
    "processed": 1200,
    "remaining": 300
  }'
curl -X POST https://api.drumbeats.io/v1/ping/<monitor-id>/log \
  -H "Content-Type: application/json" \
  -d '{
    "level": "info",
    "message": "sync in progress",
    "processed": 1200,
    "remaining": 300
  }'

The Ping API stores the entire body as the payload when no explicit payload field is present. See Ping API — Payloads for the precedence rules.

What lives on the timeline

Every ping (including log pings) creates one row on the monitor's run timeline. Each row records:

  • Event name (start, success, failure, log, or an exit-code mapping).
  • Timestamp the Drumbeats Ping API received the ping.
  • run_id if supplied — used to group concurrent runs together.
  • duration_ms if supplied or inferred from start → finish timing.
  • The payload (or a "view full payload" link for spilled payloads).
  • Request metadata: source IP, user agent.

Best practices