Observability

Event reference

The event envelope, every event type, severity mapping per destination, and the pull and streaming APIs.

Envelope

Every event — in the pull API, the stream, the CLI and every destination — has the same shape. Destinations wrap it in their own format (Splunk event, Datadog log attributes, OTLP log record attributes, webhook { events: [...] }).

FieldTypeDescription
idinteger (string in cursors)Stable, increasing id. Dedupe and resume with it.
tenant_idUUIDWorkspace
occurred_atISO 8601When the change happened
typestringDotted type, e.g. workflow.run.failed
categoryworkflow · integration · agent · audit · security · task · systemGrouping used by filters and permissions
severitydebug · info · warn · errorNormalised severity
messagestring (≤ 1000 chars)One-line summary
source_table, source_idstringWhere the event came from
trace_id, run_id, workflow_id, task_id, actor_idUUID or nullCorrelation. trace_id links a run with its integration calls and agent runs.
attributesobjectAllow-listed details: status, duration_ms, host, path, model, token counts, changed field names…
Example
{
  "id": 48213,
  "tenant_id": "6f1c…",
  "occurred_at": "2026-10-24T09:14:03.512Z",
  "type": "integration.call",
  "category": "integration",
  "severity": "warn",
  "message": "POST api.example.com/v1/orders → 429 in 812ms",
  "source_table": "integration_call_logs",
  "source_id": "b0a4…",
  "trace_id": "9d2e…", "run_id": "1c7f…", "workflow_id": "a83b…", "task_id": null, "actor_id": null,
  "attributes": { "method": "POST", "host": "api.example.com", "path": "/v1/orders", "status": 429, "duration_ms": 812 }
}

Event types

Filter with exact types or globs (* matches within a segment): workflow.run.*, *.failed, security.*.

TypeCategorySeverityWhen
workflow.run.started / resumed / waiting / paused / completedworkflowinfoA run changes status (duration_ms on completion)
workflow.run.failedworkflowerrorA run failed
workflow.run.cancelledworkflowwarnA run was cancelled
workflow.run.sla_warning / sla_breachedworkflowwarn / errorA run approaches or breaches its SLA
workflow.step.logworkflowfrom the log levelOne per step log line (turn off with settings.event_stream.include_step_logs = false)
workflow.queue.failed / deadworkflowwarn / errorA queued job failed and will retry / gave up
integration.callintegrationinfo; warn on 4xx; error on 5xxEvery outbound call: method, host, path, status, duration
integration.webhook.dead_letterintegrationerrorAn outbound webhook was dead-lettered
agent.run.<status>agenterror when failed, else infoAgent runs: model, token counts, duration
audit.<object_type>.<action>auditinfoAny audited change, with changed field names
security.oauth.token_issued / token_revoked / code_replay / refresh_reusesecurityinfo; warn for replay and reuseOAuth token lifecycle
security.api_key.<action> / security.api_key.auth_failedsecurityinfo; warn for failuresAPI key lifecycle and sampled failures
security.permission.<action>securityinfoRole and permission changes
system.retention.purged / purge_failed / review_*systeminfo / errorRetention executions and reviews
system.deletion.completed / failedsysteminfo / errorQueued deletions
system.sync.github.* / system.sync.directory.*systeminfo / errorSync runs
system.log_export.data_lostsystemwarnA destination fell behind retention
system.testsysteminfo"Send test event" (never stored)
task.<event_type>taskwarn for escalated / blocked / rejected, else infoTask lifecycle

Severity mapping

UserTasksSplunk severityDatadog statusOTLP severityNumber / Text
debugdebugdebug5 / DEBUG
infoinfoinfo9 / INFO
warnwarnwarning13 / WARN
errorerrorerror17 / ERROR

Workflow step log levels map trace → debug, warning → warn and fatal → error.

Pull API

bash
curl -H "Authorization: Bearer $USERTASKS_API_KEY" "$USERTASKS_URL/api/v1/events?since=1h&category=workflow&limit=500"
# → { "events": [...], "next_cursor": "48213", "has_more": true }
curl -H "Authorization: Bearer $USERTASKS_API_KEY" "$USERTASKS_URL/api/v1/events?after=48213&limit=500"

Filters: category, type (globs), severity (minimum), workflow_id, run_id, task_id, trace_id, since.

Live stream (Server-Sent Events)

bash
curl -N -H "Authorization: Bearer $USERTASKS_API_KEY" -H "Last-Event-ID: 48213" \
  "$USERTASKS_URL/api/v1/events/stream?severity=warn"
# id: 48214
# event: workflow.run.failed
# data: {"id":48214,"type":"workflow.run.failed",...}
# : heartbeat            (every 15 s when idle)
# event: reconnect       (before the server's time limit; resume with the last id)
  • Each message is named after its event type, so browser EventSource clients add a listener per type; curl, the SDK and the CLI see every message.
  • The stream resumes from Last-Event-ID (or ?after=); without either it starts at the newest event, or at since=.
  • On serverless hosts the response ends at the function limit with an event: reconnect hint; the SDK and usertasks logs tail reconnect without gaps.
  • The stream accepts API keys and OAuth tokens, not browser sessions.