Skip to content
Telemetry
For teams asking Claude Code to modify production apps

Claude Code observability

Ask Claude Code to add event logging while it implements a feature, then verify the events in Telemetry.

Reviewed by the Telemetry product team on . We checked the event fields, suggested queries, and data to exclude. Who reviews this page

Reuse the same reviewed instructions across repositories with the agent telemetry skill.md guide.

Why this works
  • Claude Code can add structured logs to the code it's already editing.
  • Review the dashboards and SQL queries Claude Code creates.
  • The prompt tells Claude Code to keep prompts, secrets, and raw payloads out of events.
How to test this use case

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. 1

    Choose when to log

    Create a Telemetry account and API key.

  2. 2

    Capture the outcome

    Begin with agent_task_started, agent_task_completed, feature_used and document the grain of each event.

  3. 3

    Check the stored rows

    Review the resulting tables, charts, and alerts before shipping.

  4. 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.

agent prompt

Claude Code observability setup prompt

text
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 free

Setup steps

  1. 1Create a Telemetry account and API key.
  2. 2Paste the prompt into Claude Code when you start a feature or add monitoring.
  3. 3Ask Claude Code to run the app flow, send test events, and create a dashboard.
  4. 4Review the resulting tables, charts, and alerts before shipping.

Events to capture

agent_task_startedagent_task_completedfeature_usedapi_request_completedcheckout_completedbackground_job_failed

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

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 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.

Browse all recipes

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