I’m building a customer service bot that needs to query our application logs programmatically. Currently, I can access logs through the Grafana dashboard at fly-metrics.net,
but I need API access for automated queries.
What I’ve tried:
Fly.io GraphQL API works with my token: fly auth token
Direct Quickwit API: Returns “Invalid API key” with Fly.io token
Grafana API: Session cookies expire, no service account option visible
REST endpoints like /api/v1/apps/{app}/logs: 404 not found
My use case:
I want to query logs for patterns like “discount code validation errors” to help with customer support. Something like:
curl “https://fly-metrics.net/api/…”
-H “Authorization: Bearer $FLY_TOKEN”
-d ‘{“query”: “discount code validation”, “timeRange”: “7d”}’
Questions:
- Is there a way to get API tokens for the logging infrastructure (Quickwit/Grafana)?
- Does Fly.io have a native logs API I’m missing?
- Should I integrate a separate logging service (Papertrail, Better Stack) for programmatic access?