Incidentary Docs

Wire Format

SDK-to-API batch ingest wire format specification. Propagation headers, event fields, and operation kinds.

Wire Format Reference

The Incidentary wire format defines how SDKs send captured events to the ingest server. This reference describes each field from the operator's perspective — what it is for, not how it is processed internally.

The format is at version 1 and is frozen. See the versioning section below for what this means.


Propagation Headers

These headers must be forwarded on every outbound HTTP call between instrumented services. Without them, the receiving service's events will not be connected to the calling service in the causal graph.

HeaderTypeRequiredPurpose
x-incidentary-trace-idUUID v4 stringYesGroups all events in a distributed trace. Every service in a single request chain shares this value.
x-incidentary-parent-ceUUID v4 stringNoNames the specific event in the calling service that triggered this call. Required for causal linkage. If absent, the receiving service's events appear as a separate root in the graph, not connected to the caller.

The SDKs inject these headers automatically when you use the instrumented fetch/HTTP clients. If you use a custom HTTP client, inject them manually from the current request context.


Batch Ingest Payload

All events are sent as a batch to:

POST /api/v1/ingest/batch
Content-Type: application/json
Authorization: Bearer <api_key>
X-Incidentary-SDK-Version: <semver>

Batch envelope fields

FieldTypePurpose
schema_versionstringAlways "1" in the current format
workspace_idstringYour workspace identifier
service_idstringThe service name for all events in this batch
environmentstringEnvironment label (production, staging, etc.)
flushed_atint64Unix nanosecond timestamp when this batch was assembled
capture_modestring"SKELETON" (normal) or "FULL" (elevated capture mode)
eventsarrayThe events (see event fields below)

Event fields

FieldTypePurpose
ce_idUUIDUnique identifier for this event. Used to deduplicate on retry.
trace_idUUIDWhich trace this event belongs to. All events in a distributed request chain share this value.
parent_ce_idUUID or nullWhich event caused this one. Null for trace roots (the first event in a chain).
service_idstringWhich service produced this event.
wall_ts_nsint64When the event occurred, in Unix nanoseconds.
kindstringThe operation type. See operation kinds below.
event_typestringRefined operation label (optional; derived from kind if absent).
statusint32HTTP status code or equivalent. 200 for success, 5xx for server errors.
duration_nsint64How long the operation took, in nanoseconds.
event_attrsobject or nullOptional metadata specific to the operation type.

Operation kinds

kindMeaning
HTTP_INInbound HTTP request received by this service
HTTP_OUTOutbound HTTP request sent by this service
QUEUE_PUBLISHMessage published to a queue or topic
QUEUE_CONSUMEMessage consumed from a queue or topic
JOB_STARTBackground job or worker started
JOB_ENDBackground job or worker completed
WEBHOOK_INWebhook received from an external system
WEBHOOK_OUTWebhook sent to an external system
INTERNAL_TASKInternal operation that doesn't fit other categories

Refined event types

The event_type field provides a more specific label within an operation kind. If absent, it is derived from kind.

event_typekindMeaning
http_inHTTP_INStandard inbound HTTP request
http_outHTTP_OUTStandard outbound HTTP request
grpc_inHTTP_INInbound gRPC call (gRPC runs over HTTP/2)
grpc_outHTTP_OUTOutbound gRPC call
queue_publishQUEUE_PUBLISHMessage published to a queue
queue_consumeQUEUE_CONSUMEMessage consumed from a queue
db_queryINTERNAL_TASKDatabase query (SQL text, no parameters)
job_startJOB_STARTBackground job started
job_endJOB_ENDBackground job completed
webhook_inWEBHOOK_INInbound webhook
webhook_outWEBHOOK_OUTOutbound webhook

Capture Modes

ModeWhenWhat is captured
SKELETONNormal operationTiming, status, and causal structure only
FULLElevated capture (pre-arm or active incident)Skeleton plus optional detail metadata: headers, retry information, route templates, request/response size estimates

The SDK manages capture mode automatically based on observed anomaly signals. You do not configure this manually unless you need to tune the thresholds.


Versioning

The format is frozen at version 1. This means:

  • No field removals: if a field exists in v1, it will always be present in the schema
  • No semantic changes: the meaning of existing fields will not change
  • No new required fields: new optional fields may be added with safe defaults

SDKs below the minimum supported version receive HTTP 426 Upgrade Required:

{
  "error": {
    "code": "SDK_VERSION_TOO_OLD",
    "message": "SDK version X.Y.Z is below minimum A.B.C.",
    "minimum_version": "A.B.C",
    "current_version": "X.Y.Z"
  }
}

Keep your SDK up to date to avoid this.


Example payload

{
  "schema_version": "1",
  "workspace_id": "ws_01ABCDEF",
  "service_id": "checkout-api",
  "environment": "production",
  "flushed_at": 1733103000000000000,
  "capture_mode": "SKELETON",
  "events": [
    {
      "ce_id": "550e8400-e29b-41d4-a716-446655440000",
      "trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "parent_ce_id": null,
      "service_id": "checkout-api",
      "wall_ts_ns": 1733103000000000001,
      "kind": "HTTP_IN",
      "event_type": "http_in",
      "status": 200,
      "duration_ns": 45000000,
      "event_attrs": {
        "route_template": "/orders/:id/checkout"
      }
    },
    {
      "ce_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "parent_ce_id": "550e8400-e29b-41d4-a716-446655440000",
      "service_id": "checkout-api",
      "wall_ts_ns": 1733103000010000000,
      "kind": "HTTP_OUT",
      "event_type": "http_out",
      "status": 503,
      "duration_ns": 35000000,
      "event_attrs": null
    }
  ]
}

On this page