Measure Claude Code observability and check the results
To measure claude code observability, 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
Create a Telemetry account and API key.
- 2
Capture the outcome
Begin with agent_task_started, agent_task_completed, feature_used and document the grain of each event.
- 3
Check the stored rows
Review the resulting tables, charts, and alerts before shipping.
- 4
Make the decision
Which features written by agents get used after release?
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.
Claude Code observability setup prompt
Instrument this project with structured logs using /skill.md.
Use this Telemetry API key: YOUR_API_KEY
Anonymous keys support logging and synchronous SQL without signup. Claim the existing workspace at https://telemetry.sh/register with the same key before creating dashboards or alerts. If it is unclaimed, query the event to verify delivery and report which features need signup.
Please:
1. Find the most important user-facing flows, background jobs, and AI/tooling workflows.
2. Add structured logging with snake_case table and field names.
3. Capture the key signals for each workflow, including status, latency, identifiers, and error context when relevant.
4. Run one real user-facing or operational flow through the instrumented application and verify its event appears in Telemetry. Do not use telemetry_quickstart for this milestone.
5. Run a read-only query over that real event, then create a high-level dashboard with charts and tables that summarize the most important signals in this project.
6. Tell me what you instrumented, which real flow you verified, which tables you created, and which dashboard views I should review first.
Keep event payloads small and focused. Make dashboard labels and charts easy to scan.Create the API key for this prompt, preview a working agent event, and replace the sample when your application is ready.
Open this setup freeSetup steps
- 1Create a Telemetry account and API key.
- 2Paste the prompt into Claude Code when you start a feature or add monitoring.
- 3Ask Claude Code to run the app flow, send test events, and create a dashboard.
- 4Review the resulting tables, charts, and alerts before shipping.
Events to capture
Questions you can answer
- Which features written by agents get used after release?
- Where are Claude Code changes creating support or reliability risk?
- Which workflows should get alerts before more automation is added?
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.
user_signed_up
One accepted signup per user and account.
View schemaproduct_milestone_completed
One completed milestone per actor, account, and occurrence.
View schemaai_agent_run_completed
One terminal outcome per logical agent run.
View schemaUse these queries in Telemetry
Learn about Dashboards
Save a product or revenue query to a dashboard your team can check.
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.
Calculate API error rate by route
Which API routes have the highest 5xx error rate with at least 20 requests?
Open recipeMeasure background job retry and failure rate
Which background jobs consume the most retries or still fail?
Open recipeBuild a signup-to-activation funnel in SQL
Where do new users leave before reaching first value?
Open recipeNext 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
AI agent telemetry and observability
Record agent runs and tool calls in Telemetry tables. Query retries, latency, cost, failures, and whether users accepted the results.
Open pageCursor Telemetry setup
Paste this prompt into Cursor to add event tables, track signup steps, and build dashboards.
Open pageCodex instrumentation prompt
Ask Codex to add product events, verify that they arrive, and report which workflows still need logging.
Open page