Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add panels for app vs edge region usage #1

Open
leighmcculloch opened this issue Oct 30, 2021 · 3 comments
Open

Add panels for app vs edge region usage #1

leighmcculloch opened this issue Oct 30, 2021 · 3 comments

Comments

@leighmcculloch
Copy link

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
{
  "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
{
  "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
Copy link
Member

jeromegn commented Nov 1, 2021

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
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants