Measure Background job monitoring and check the results
To measure background job monitoring, choose one workflow and its owner. Define the events, test them with known inputs, and write a query that answers a specific question.
- 1
Choose when to log
Log job_started, job_completed, job_failed, and job_retried.
- 2
Capture the outcome
Begin with job_started, job_completed, job_failed and document the grain of each event.
- 3
Check the stored rows
Add alerts for stalled jobs, repeated failures, and dead-letter creation.
- 4
Make the decision
Which jobs fail or retry most often?
Use case versus template
Choose what to measure
Use this guide to choose what to measure and when to log it. For a shorter setup prompt, open the matching template.
Agent prompt
Paste this into your coding agent
Replace YOUR_API_KEY after signup, then ask the agent to run the product flow and verify the first events.
Background job monitoring setup prompt
Instrument background jobs and async workers with Telemetry.
Use /skill.md and this Telemetry API key: YOUR_API_KEY
Please log job_started, job_completed, and job_failed events with job_name, queue_name, attempt, status, duration_ms, scheduled_at, started_at, completed_at, item_count, retry_count, and error_type.
Create a dashboard showing throughput by job, failures by job, p95 duration, retry volume, oldest pending job, and dead-letter events. Add alerts for stalled jobs and repeated failures.Setup steps
- 1Log job_started, job_completed, job_failed, and job_retried.
- 2Include queue, job name, attempt, duration, item count, and error type.
- 3Build a dashboard for throughput, failures, retries, and p95 duration.
- 4Add alerts for stalled jobs, repeated failures, and dead-letter creation.
Events to capture
Questions you can answer
- Which jobs fail or retry most often?
- Which queues are falling behind?
- Which customers are affected by failed background work?
Example event schemas
Event schemas for this workflow
Check what each event records, when to send it, and which field types it needs. Review the example payload and privacy checklist before using it in production.
Use these queries in Telemetry
Learn about Alerts
Add a threshold and recipients to your reliability query to get alerts.
Related SQL recipes
More SQL recipes
Run the query using this workflow's event fields and check the example result. Save the result to a dashboard or set up an alert.
Measure background job retry and failure rate
Which background jobs consume the most retries or still fail?
Open recipeFind stalled background jobs with SQL
Which jobs started but never produced a final event?
Open recipeMeasure queue wait time by job
Which jobs wait longest before a worker starts them?
Open recipeMeasure dead-letter queue growth
Which queues are adding dead-letter jobs faster than they are resolving them?
Open recipeDetect missed cron schedules
Which scheduled jobs ran later than their documented interval?
Open recipeDetect background-job retry storms
Which job types are spending the most work on retries right now?
Open recipeCustomer evidence
Related customer stories
Next step
Create the API key your agent will use
The free plan is enough to run the prompt, send test events, and review the first dashboard.
Related pages
Crypto and onchain automation monitoring
Track indexed events, agent actions, transaction costs, wallet workflows, tool calls, and failed automation jobs.
Open pageClaude Code observability
Ask Claude Code to add event logging while it implements a feature, then verify the events in Telemetry.
Open pageCodex instrumentation prompt
Ask Codex to add product events, verify that they arrive, and report which workflows still need logging.
Open page