Skip to content

Monitoring guide

How to monitor Fly.io

Fly.io runs your app close to users in many regions. That means failures can be regional too, so monitor from several places.

3 min read8 sectionsUpdated

On this page

Why Fly.io needs its own monitoring

With machines in several regions, one region can fail while the others are fine, and users near it see errors that a single check from elsewhere never notices. Machines can also stop and start automatically with traffic, which changes latency for the first requests.

Fly.io exposes Prometheus metrics for apps and machines and offers a hosted Grafana view, plus health checks that control routing and restarts. Alerting rules, long-term history and checks from users’ point of view are yours to add.

What typically goes wrong

  • One region failing or slow while others are fine.
  • Machines stopped by autostop and slow to start for the first request.
  • Health checks passing while the app cannot reach its database.
  • Postgres replicas lagging or the primary failing over.
  • Volumes filling up on machines with local storage.

What to monitor

SignalHow to measure itAlert when
Uptime per regionHTTP checks from several regions near your usersAny region fails twice in a row
Machine healthFly metrics scraped into your backendRestarts or failed health checks
Latency per regionTraces tagged with the region (`FLY_REGION`)p95 in one region doubles
Database replicationPostgres replication lagLag over 30 seconds
Volume usageDisk metricsAbove 80%

Set it up, step by step

  1. Check from several regions. Pick check regions near your Fly regions so regional failures show up.
  2. Collect metrics. Scrape the Fly Prometheus endpoint with an OpenTelemetry Collector into your backend.
  3. Tag traces with the region. Add FLY_REGION as a resource attribute so slow regions stand out.
  4. Make health checks deep. Check the database connection, not only the process.
  5. Alert on regional symptoms. Per-region uptime and latency, plus replication lag.

Route alerts to the people who can act on them (Slack for warnings, a phone call for outages), and put the checks behind a status page so users see what you see.

Fly.io specifics

Multi-region confirmation matters most on Fly: a check that alerts only when two regions fail avoids false alarms from one network path, while per-region monitors catch a real regional outage. See Postgres monitoring for the database side.

Frequently asked questions

Does Fly.io have monitoring?

It exposes Prometheus metrics and a Grafana view; alerting and outside checks are up to you.

How do I see which region is slow?

Tag traces and metrics with the region and compare p95 latency per region.

Why is the first request slow?

Machines may be stopped when idle and start on demand; keep a minimum running if latency matters.

  • Azure monitoring for applications: Monitor applications on Azure: App Service, AKS and Azure SQL metrics that matter, collecting Azure Monitor metrics with the OpenTelemetry Collector.
  • How to monitor Heroku: How to monitor apps on Heroku: H12 timeouts and other router errors, dyno memory (R14), response time, Postgres and Redis add-ons, uptime checks and alerts.
  • Kafka monitoring: consumer lag and broker health: Monitor Apache Kafka: consumer lag per group, under-replicated partitions, broker request latency, disk usage and producer errors, with CLI checks.
  • API monitoring: Monitor REST APIs from outside with status, JSON and response-time assertions, and from inside with APM: slow endpoints, errors, database calls and traces.
  • What is URL monitoring?: URL monitoring explained: scheduled checks of a URL for status code, content, response time, redirects and SSL, with sensible settings.
  • How to monitor a Next.js app: How to monitor a Next.js app in production: uptime checks, Core Web Vitals, server and edge errors, OpenTelemetry traces for SSR and API routes, and alerts.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.