Fly.ioTutorial
Hooking Up Fly Metrics
Summary
Fly apps include built-in Prometheus instrumentation, exposing automatically collected metrics through a public Prometheus endpoint and allowing applications to export custom metrics. The walkthrough connects an organization’s Fly Prometheus URL to Grafana with a Fly token, then explains dashboard variables and PromQL queries using counters, gauges, histograms, labels, irate(), rate(), increase(), sum(), and regional grouping. Examples cover network traffic, TCP connections, HTTP response rates by region, and response-time heatmaps built from histogram buckets ranging from 5ms to 120s. Application instrumentation is shown for Go, Python Flask, and Node.js, with scraping configured in fly.toml through a metrics port and path. The post concludes that metrics are currently free, with some tier free forever, although a future pricing plan is expected for ambitious usage.
Context
Fly apps provide built-in Prometheus metrics, and the post explains how Fly users can monitor performance, create alerts, and export application-specific metrics through Grafana.
Approach / What changed
The walkthrough configures Fly’s organization-specific Prometheus endpoint as a Grafana data source, demonstrates dashboard PromQL queries and visualizations, and shows how Go, Python Flask, and Node.js applications expose metrics for Fly to scrape via fly.toml.
Takeaways
Fly’s Prometheus endpoint is organization-specific; Grafana authentication is configured with a custom Authorization header containing a Fly token.
The examples use counters for network and HTTP events, increase() for connection charts, regional aggregation for request rates, and histogram buckets for response-time heatmaps.
Applications can expose custom Prometheus metrics through a /metrics endpoint, with Fly scraping the configured port and path; metrics are currently free, though future pricing is planned for ambitious usage.
Source and freshness
- Source
- fly.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.