A step-by-step walkthrough of how logging works on Fly.io, covering how Fly captures stdout/stderr via Vector and its internal NATS cluster, how to view logs using the fly logs CLI command and the web dashboard, and how to build and deploy a sample FastAPI app that generates logs. It also demonstrates setting up the Fly log shipper to route logs to Honeybadger Insights, including configuring secrets and running search queries against shipped logs.
Table of contents
How does Fly.io logging work?Basic way to access logs on Fly.ioShipping Fly.io logs to Honeybadger InsightsMore on Honeybadger InsightsQuestions this post answers
How does Fly.io collect logs from my application?
Fly.io runs each app inside a lightweight VM where an init process captures anything written to stdout or stderr and forwards it to the host machine. The host then sends logs over a socket to Vector, which delivers them into Fly's internal NATS cluster where clients can subscribe to specific topics and route logs elsewhere, such as to Honeybadger. Developers wiring up Fly.io observability track platform changes like this on daily.dev.
How do I view live logs for a Fly.io app from the CLI?
Run fly logs to tail live logs for the currently targeted app, or fly logs -a my-app-name to filter to a specific application when running multiple apps. Each Machine can also be inspected individually with fly machine list to get Machine IDs and fly machine status <id> to check a single instance's activity. Engineers debugging deployed services can keep Fly.io troubleshooting tips within reach on daily.dev.
How do I ship Fly.io logs to Honeybadger Insights?
Deploy the Fly log shipper using fly launch --no-deploy --image ghcr.io/superfly/fly-log-shipper:latest, then set secrets for ORG, ACCESS_TOKEN (from fly auth token), and HONEYBADGER_API_KEY from a Honeybadger project. Update the fly.toml services block to use internal_port 8686 and deploy; logs then flow into Honeybadger Insights, where they can be queried with a filter syntax like filter fly.app.name::str == "app-name". Teams building observability pipelines can follow log-shipping setups like this via daily.dev.