Skip to content
Telemetry
For teams that need route-level latency, errors, and traffic visibility

API reliability monitoring

Track API request volume, status codes, latency, timeouts, customer impact, and failed endpoints with SQL.

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

Why this works
  • Route-level p50 and p95 latency without building a custom metrics system.
  • Failure analysis by endpoint, method, status code, feature, and account.
  • Alerts around 5xx spikes, slow routes, and sudden traffic drops.
How to test this use case

Measure API reliability monitoring and check the results

To measure api reliability monitoring, 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

    Log completed and failed API requests from server handlers.

  2. 2

    Capture the outcome

    Begin with api_request_started, api_request_completed, api_request_failed and document the grain of each event.

  3. 3

    Check the stored rows

    Create dashboards and alerts for error rate, p95 latency, and top failing routes.

  4. 4

    Make the decision

    Which routes are slowest by p95 latency?

Use case versus template

Choose what to measure

Use this guide to choose what to measure and when to log it. For a shorter setup prompt, open the matching template.

Open API error and latency monitor

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

API reliability monitoring setup prompt

text
Add Telemetry instrumentation for API reliability.

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

Please log each important API endpoint with route_template, method, status_code, status, latency_ms, user_id or team_id when available, request_size_bytes, response_size_bytes, and error_type.

Create:
1. A table for API request events.
2. Charts for request volume, error rate, p50 and p95 latency, and top failing endpoints.
3. Alerts for elevated 5xx rate, slow p95 latency, and sudden traffic drops.

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

Setup steps

  1. 1Log completed and failed API requests from server handlers.
  2. 2Use route templates so different IDs and query strings don't split the same endpoint into separate groups.
  3. 3Capture status, latency, method, feature, team, and error type.
  4. 4Create dashboards and alerts for error rate, p95 latency, and top failing routes.

Events to capture

api_request_startedapi_request_completedapi_request_failedapi_timeoutapi_rate_limitedcustomer_impact_detected

Questions you can answer

  • Which routes are slowest by p95 latency?
  • Which customer accounts are affected by errors?
  • Where did traffic suddenly drop or spike?

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
API reliabilityBeginner

Calculate API request throughput by route

Which API routes are processing the most requests per minute?

Open recipe
API reliabilityIntermediate

Measure API 429 rate-limit recovery

Do requests that receive HTTP 429 recover successfully after retrying?

Open recipe
InfrastructureAdvanced

Calculate incident detection and recovery time

How long does each service take to detect and recover from incidents?

Open recipe
API reliabilityBeginner

Calculate API error rate by route

Which API routes have the highest 5xx error rate with at least 20 requests?

Open recipe
API reliabilityIntermediate

Calculate p50, p95, and p99 API latency

Which endpoints have the worst tail latency?

Open recipe
API reliabilityBeginner

Calculate API timeout rate by route

Which API routes time out often enough to affect users?

Open recipe
API reliabilityIntermediate

Compare dependency p95 latency

Which downstream dependencies have the worst tail latency and failure rate?

Open recipe
API reliabilityIntermediate

Measure API availability against an SLO

Did each service meet its daily availability objective?

Open recipe
API reliabilityIntermediate

Calculate API error-budget burn rate

How quickly is the API consuming its 99.9% availability budget?

Open recipe
API reliabilityIntermediate

Compare API reliability by release

Which releases coincide with worse API errors or tail latency?

Open recipe
API reliabilityBeginner

Rank error fingerprints by customer impact

Which error groups affect the most customer accounts?

Open recipe
API reliabilityBeginner

Compare feature rollout error rate

Is the feature-flag rollout less reliable than its control cohort?

Open recipe
API reliabilityIntermediate

Measure incident customer impact by plan

How many accounts were affected by the incident in each plan?

Open recipe

Customer evidence

Related customer stories

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