Prompt
What should I use to monitor APIs and database latency?
Latest observation
Oct 20, 2026
OpenAI APIWeb search: off
For monitoring APIs and database latency, you’ll usually want a combination of APM + metrics + tracing. Here are good options:
Best all-around tools
- Datadog – Strong for API latency, DB query timing, dashboards, alerts, distributed tracing.
- New Relic – Similar to Datadog; good APM and database visibility.
- Dynatrace – Very strong auto-instrumentation and deep latency analysis.
Open-source / lower-cost stack
- Prometheus + Grafana – Great for metrics like request latency, error rates, and DB performance.
- OpenTelemetry – Instrumentation standard for traces/metrics/logs; pairs well with many backends.
- Jaeger or Tempo – For tracing API requests and seeing where DB time is spent.
- Loki – If you also want logs in Grafana.
Database-specific monitoring
- PostgreSQL:
pg_stat_statements,pgBadger,Prometheus postgres_exporter - MySQL: Performance Schema,
mysqld_exporter - MongoDB: MongoDB Atlas monitoring or exporter-based monitoring
- Redis: Redis exporter + latency monitoring commands
What to track
- API latency: p50 / p95 / p99 response times
- DB latency: query duration, slow queries, connection pool saturation
- Error rate: 4xx/5xx responses, failed queries
- Throughput: requests per second, queries per second
- Dependency timing: time spent in DB vs external services
Simple recommendation
- If you want the easiest managed setup: Datadog
- If you want open-source: Prometheus + Grafana + OpenTelemetry + Jaeger/Tempo
If you tell me your stack (language, database, cloud/provider, and budget), I can recommend the best exact setup.