Fly.io
To integrate with Fly.io, you'll need to stand up HyperDX's Fly log shipper, which extends the functionality of the default Fly log shipper.
This Guide Integrates: Logs
To send over metrics or APM/traces, you'll need to add the corresponding language integration to your application as well.
Getting Started
Create a Log Shipper
# Make a directory for your log shipper app
mkdirhyperdxlogshipper
cdhyperdxlogshipper
# Create the app but don't deploy just yet
flylaunch--no-deploy--imageghcr.io/hyperdxio/fly-log-shipper:latestConfigure Secrets
# Set required secrets, including your HyperDX API key
flysecretssetORG=personal# Set to your Fly org id
flysecretssetACCESS_TOKEN=$(flyauthtoken)
flysecretssetHYPERDX_API_KEY="<YOUR_API_KEY_HERE>"Configure the Shipper
Before deploying the log shipper, you'll need to edit the generated fly.toml
and remove the [http_service] section entirely and
configure or add the entire [[services]] section with:
[[services]]
http_checks = []
internal_port = 8686
auto_stop_machines = false
auto_start_machines = false
min_machines_running = 1To ensure the log shipper will pass health checks and will not scale down.
Deploy the Log Shipper
Then you can deploy the log shipper:
flydeploy--ha=falseWe'll need to disable high availability for the log shipper deployment, as we only want a single instance (to prevent duplicate logs from being sent). For an HA setup, you can follow the instructions here (opens in a new tab).
Read more about Fly's log shipper here (opens in a new tab).