Telemetry
Copy-paste instrumentation template

API Error And Latency Monitor

Watch request volume, status codes, route latency, failed endpoints, and customer-impacting API incidents.

Questions this unlocks
  • Which routes are slowest by p95 latency?
  • Which customers are affected by elevated errors?
  • Where did traffic drop or spike?

Template

Paste this into your coding agent

Replace YOUR_API_KEY, run the flow locally, then verify the generated events and dashboards.

api-error-monitor

API Error And Latency Monitor

text
Add Telemetry to API request handling.

Use /skill.md and this Telemetry API key: YOUR_API_KEY

Log each important API request with:
route_template, method, status_code, status, latency_ms, user_id, team_id, request_size_bytes, response_size_bytes, error_type, and feature.

Create charts for request volume, error rate, p50 latency, p95 latency, and top failing endpoints. Add alerts for 5xx spikes, slow p95 latency, and traffic drops.

Do not log request bodies, cookies, auth headers, secrets, or raw user content.

Events to capture

api_request_startedapi_request_completedapi_request_failedapi_rate_limitedapi_timeout

More templates