Skip to content
Telemetry
For teams using Codex to add analytics and observability

Codex instrumentation prompt

Ask Codex to add product events, verify that they arrive, and report which workflows still need logging.

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
  • The prompt asks Codex to record product actions, billing events, onboarding steps, and application failures.
  • Asks Codex to send test events and check that they arrive.
  • Choose fields you can query later as new product questions come up.
How to test this use case

Measure Codex instrumentation prompt and check the results

To measure codex instrumentation prompt, 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

    Generate or copy a Telemetry API key.

  2. 2

    Capture the outcome

    Begin with page_viewed, code_snippet_copied, integration_check_submitted and document the grain of each event.

  3. 3

    Check the stored rows

    Query Telemetry for the new events and fill remaining gaps.

  4. 4

    Make the decision

    Do users who copy setup prompts reach activation faster?

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

Codex instrumentation prompt 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. 1Generate or copy a Telemetry API key.
  2. 2Ask Codex to apply the prompt in your repository.
  3. 3Run the product flows that matter.
  4. 4Query Telemetry for the new events and fill remaining gaps.

Events to capture

page_viewedcode_snippet_copiedintegration_check_submittedbilling_portal_openedalert_createdresult_exported

Questions you can answer

  • Do users who copy setup prompts reach activation faster?
  • Which docs pages produce registrations?
  • Which product areas are used before checkout?

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

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