Skip to content
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 verified event and SQL before adding saved dashboards.
  • 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

    Choose one completed application action for Claude Code to instrument.

  2. 2

    Capture the outcome

    Choose only the fields needed for the selected application action; keep private content and credentials out.

  3. 3

    Check the stored rows

    Run that action and verify its stored event with SQL. A sample event does not finish setup.

  4. 4

    Make the decision

    Review the observed event and any coverage gaps before expanding instrumentation.

Agent prompt

Paste this into your coding agent

Replace YOUR_API_KEY with your existing server-side key, or try the first-event setup without signup. Dashboards require a claimed workspace.

agent prompt

Claude Code observability setup prompt

text
Verify an authenticated Telemetry integration with one real application event using /skill.md.

Use this Telemetry API key in server-side code only: 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. Choose one completed application action and capture event_name, service, route, status, duration_ms, and release when available.
2. Do not log credentials, raw request bodies, or customer content.
3. Run that real action once and verify its event appears in the intended workspace. Do not use telemetry_quickstart for this milestone.
4. Check the delivery response and query the event to confirm the key, workspace, and table match. If delivery fails, report the response status without exposing the key.
5. Tell me which real event was verified, what the result means, and how to return to it after the next application run.

Start with one real application action and verify its stored event. A sample event is only a diagnostic.

Try with your coding agent

Setup steps

  1. 1Start without signup, or use your existing server-side API key.
  2. 2Choose one completed application action for Claude Code to instrument.
  3. 3Run that action and verify its stored event with SQL. A sample event does not finish setup.
  4. 4Claim the workspace to save dashboards, then review the result 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

Verify one real application event

Send and query one real event without signup. Claim the workspace to save dashboards.

Related pages