superfly / dashboards

Collection of dashboards for visualizing Fly.io app data
9 stars 0 forks source link

Add panels for app vs edge region usage #1

Open leighmcculloch opened 3 years ago

leighmcculloch commented 3 years ago

It'd be useful to have in the HTTP section of the default dashboard panels that show edge and app region requests.

I have a couple panels that do this that could be included and might be helpful to others.

App HTTP Count by Region (2xx)

App HTTP Count by Region (2xx) panel

Panel JSON ```json { "id": 37, "gridPos": { "h": 5, "w": 6, "x": 0, "y": 1 }, "type": "bargauge", "title": "App HTTP Count by Region (2xx)", "pluginVersion": "8.2.2-39068", "maxDataPoints": 1, "fieldConfig": { "defaults": { "thresholds": { "mode": "percentage", "steps": [ { "color": "dark-green", "value": null }, { "color": "semi-dark-green", "value": 25 }, { "color": "light-green", "value": 50 }, { "color": "super-light-green", "value": 75 } ] }, "mappings": [], "color": { "mode": "thresholds" } }, "overrides": [] }, "options": { "reduceOptions": { "values": false, "calcs": [ "last" ], "fields": "" }, "orientation": "vertical", "text": {}, "displayMode": "gradient", "showUnfilled": true }, "targets": [ { "expr": "sort_desc(\n sum(\n increase(fly_app_http_responses_count{app=\"$app\",status=~\"2[0-9][0-9]\"}[$__range])\n )by(region)\n)", "legendFormat": "{{region}}", "interval": "", "exemplar": true, "hide": false, "instant": true, "refId": "B" } ], "interval": null, "timeFrom": null, "timeShift": null, "datasource": null } ```

Edge HTTP Count by Region (2xx)

Edge HTTP Count by Region (2xx) panel

Panel JSON ```json { "id": 36, "gridPos": { "h": 5, "w": 18, "x": 6, "y": 1 }, "type": "bargauge", "title": "Edge HTTP Count by Region (2xx)", "pluginVersion": "8.2.2-39068", "maxDataPoints": 1, "fieldConfig": { "defaults": { "thresholds": { "mode": "percentage", "steps": [ { "color": "dark-green", "value": null }, { "color": "semi-dark-green", "value": 25 }, { "color": "light-green", "value": 50 }, { "color": "super-light-green", "value": 75 } ] }, "mappings": [], "color": { "mode": "thresholds" } }, "overrides": [] }, "options": { "reduceOptions": { "values": false, "calcs": [ "sum" ], "fields": "" }, "orientation": "auto", "text": {}, "displayMode": "lcd", "showUnfilled": true }, "targets": [ { "expr": "sort_desc(\n sum(\n increase(fly_edge_http_responses_count{app=\"$app\",status=~\"2[0-9][0-9]\"}[$__range])\n )by(region)\n)", "legendFormat": "{{region}}", "interval": "", "exemplar": true, "format": "time_series", "hide": false, "instant": true, "intervalFactor": 1, "refId": "A" } ], "interval": null, "timeFrom": null, "timeShift": null, "datasource": null } ```
jeromegn commented 3 years ago

Nice!

I suppose this could be useful for some people. Why did you find it helpful?

We tend to look at requests rates a lot more than actual count, internally and in our customer-facing dashboards. We use increase only for things like errors returned by our proxy.

leighmcculloch commented 3 years ago

I added it in prep for moving a couple sites from AWS+GCP. I'm unsure of what region to select.

I could make a guess, but since Fly exposes the edge metrics it's trivial to see which regions people are entering the Fly network. Helps me identify that oh, it might be worthwhile deploying in this other region since a decent amount of visitors are coming from there.

I added the app metrics mostly so that it is easy to see side-by-side the difference if any noticeable difference exists. Also to highlight if there's under utilization of any region that is maybe not worth it.

leighmcculloch commented 3 years ago

Rates make sense 👍🏻. I was using that initially, but wanted to test the graphs on a low traffic site I'm testing Fly with, and it was easier to understand the graphs without rate.