Telemetry
Async reliability

background_job_completed event schema

A terminal job event that records the final outcome and attempt count once, avoiding the overcounting caused by one row per retry.

Reviewed by the Telemetry product team on . Event grain, ownership, field types, privacy classification, example payload, and validation. Review standards and ownership

Question this contract answers

Which jobs fail, retry, wait, or run slowly?

Fields
11
Required
11
Contract evidence path

background_job_completed: from owned boundary to trusted query

Treat background_job_completed as a durable analytical contract: the owner emits one documented grain, a fixture proves the fields, and a reviewed query answers the stated question.

  1. 1

    Outcome becomes final

    Worker after success or permanent failure emits only after the job succeeds or exhausts its retry policy.

  2. 2

    Contract is bounded

    11 required fields preserve the declared grain: One terminal outcome per logical job.

  3. 3

    Fixture is verified

    Check types, UTC time, alternate outcomes, idempotency, and every pseudonymous or review-classified field.

  4. 4

    Question is answered

    Which jobs fail, retry, wait, or run slowly?

Grain

One terminal outcome per logical job.

Owner

Worker after success or permanent failure

Emit when

After the job succeeds or exhausts its retry policy.

Field contract

Typed fields with explicit privacy boundaries

Keep existing field names and types stable after production queries depend on them. Optional context should remain bounded, documented, and justified by a specific decision.

FieldTypeRequiredPrivacyMeaning
timestamp_utctimestampyesnon-sensitiveUTC time at the outcome boundary.
event_idstringyesnon-sensitiveStable unique identifier used for deduplication.
releasestringyesnon-sensitiveApplication or service version that emitted the event.
account_idstringyespseudonymousStable internal account identifier, never an email or name.
job_idstringyespseudonymousStable logical job identifier.
job_namestringyesnon-sensitiveLow-cardinality job type.
queue_namestringyesnon-sensitiveQueue that executed the job.
attempt_countnumberyesnon-sensitiveTotal attempts including the terminal attempt.
queue_wait_msnumberyesnon-sensitiveTime from enqueue to first execution.
duration_msnumberyesnon-sensitiveTerminal attempt duration.
statusstringyesnon-sensitiveSuccess or permanent error.

Synthetic JSON event

{
  "timestamp_utc": "2026-07-28T14:22:02Z",
  "event_id": "evt_job_01",
  "account_id": "acct_8f31",
  "release": "2026.07.2",
  "job_id": "job_31be",
  "job_name": "workspace_export",
  "queue_name": "exports",
  "attempt_count": 2,
  "queue_wait_ms": 340,
  "duration_ms": 8420,
  "status": "success"
}

Privacy review

Review identifiers before ingestion

This example uses synthetic identifiers. Pseudonymous values can still be personal data, and review fields can expose business or provider context. Apply your own consent, retention, access, residency, and deletion requirements.

  • account_id: pseudonymous
  • job_id: pseudonymous

Validation checklist

Prove the contract before building a dashboard

  • Send one known background_job_completed fixture after the documented outcome boundary.
  • Verify all 11 required fields arrive with the documented types.
  • Retry the same event identifier and confirm the chosen deduplication behavior.
  • Send a controlled failure or alternate outcome when the workflow supports one.
  • Run the related SQL over a fixed window and reconcile the result to the fixture.

Common mistakes

Keep one row equal to one durable outcome

  • Emitting background_job_completed before worker after success or permanent failure knows the final outcome.
  • Mixing several grains in one table, which makes counts and rates ambiguous.
  • Replacing controlled categories with raw URLs, payloads, prompts, or error text.
  • Changing a field type in place after saved queries and dashboards depend on it.
  • Adding identifiers without a documented investigation, access, and retention need.

Use the contract

Query and operationalize the event

Related contracts

Send a fixture before production traffic

Create a free API key, send the synthetic event, and inspect the inferred table before connecting a live workflow.

Test this schema