{
  "__inputs": [
    {
      "name": "DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY",
      "label": "Managed_Prometheus_jamesnk-telemetry",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.4.8"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [
    {
      "asDropdown": false,
      "icon": "dashboard",
      "includeVars": false,
      "keepTime": true,
      "tags": [],
      "targetBlank": false,
      "title": " ASP.NET Core",
      "tooltip": "",
      "type": "link",
      "url": "/d/KdDACDp4z/asp-net-core-metrics"
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-green",
            "mode": "continuous-GrYlRd",
            "seriesBy": "max"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 50,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": [
          {
            "__systemRef": "hideSeriesFrom",
            "matcher": {
              "id": "byNames",
              "options": {
                "mode": "exclude",
                "names": [
                  "p50"
                ],
                "prefix": "All except:",
                "readOnly": true
              }
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 40,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.50, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "legendFormat": "p50",
          "range": true,
          "refId": "p50"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.75, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "hide": false,
          "legendFormat": "p75",
          "range": true,
          "refId": "p75"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.90, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "hide": false,
          "legendFormat": "p90",
          "range": true,
          "refId": "p90"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.95, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "hide": false,
          "legendFormat": "p95",
          "range": true,
          "refId": "p95"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.98, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "hide": false,
          "legendFormat": "p98",
          "range": true,
          "refId": "p98"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.99, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "hide": false,
          "legendFormat": "p99",
          "range": true,
          "refId": "p99"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "histogram_quantile(0.999, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m])) by (le))",
          "hide": false,
          "legendFormat": "p99.9",
          "range": true,
          "refId": "p99.9"
        }
      ],
      "title": "Requests Duration - $method $route",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic",
            "seriesBy": "max"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 50,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "All"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "dark-orange",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "4XX"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "yellow",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "5XX"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "dark-red",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 46,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\", status_code=~\"4..|5..\"}[5m]) or vector(0)) / sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m]))",
          "legendFormat": "All",
          "range": true,
          "refId": "All"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\", status_code=~\"4..\"}[5m]) or vector(0)) / sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m]))",
          "hide": false,
          "legendFormat": "4XX",
          "range": true,
          "refId": "4XX"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\", status_code=~\"5..\"}[5m]) or vector(0)) / sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[5m]))",
          "hide": false,
          "legendFormat": "5XX",
          "range": true,
          "refId": "5XX"
        }
      ],
      "title": "Errors Rate - $method $route",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Requests"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 300
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "gradient",
                  "type": "gauge"
                }
              },
              {
                "id": "color",
                "value": {
                  "mode": "continuous-YlRd"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Route"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "title": "",
                    "url": "/d/NagEsjE4z/asp-net-core-endpoint-details?var-route=${__data.fields.Route}&var-method=${__data.fields.Method}&${__url_time_range}"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 9
      },
      "hideTimeOverride": false,
      "id": 44,
      "options": {
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Value"
          }
        ]
      },
      "pluginVersion": "9.4.8",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum by (exception_name) (\r\n  max_over_time(http_server_request_duration_s_count{route=\"$route\", method=\"$method\", exception_name!=\"\"}[$__rate_interval])\r\n)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{route}}",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Unhandled Exceptions",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "method": false
            },
            "indexByName": {
              "Time": 0,
              "Value": 2,
              "exception_name": 1
            },
            "renameByName": {
              "Value": "Requests",
              "exception_name": "Exception",
              "method": "Method",
              "route": "Route"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "blue",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 12,
        "y": 9
      },
      "id": 42,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "max"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "pluginVersion": "9.4.8",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "sum by (status_code) (\r\n    max_over_time(http_server_request_duration_s_count{route=\"$route\", method=\"$method\"}[$__rate_interval])\r\n  )",
          "legendFormat": "Status {{status_code}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Requests HTTP Status Code",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "green",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 12,
        "y": 13
      },
      "id": 48,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "max"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "pluginVersion": "9.4.8",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "sum by (scheme) (\r\n    max_over_time(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[$__rate_interval])\r\n  )",
          "legendFormat": "{{scheme}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Requests Secured",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "purple",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 18,
        "y": 13
      },
      "id": 50,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "max"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "pluginVersion": "9.4.8",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
          },
          "editorMode": "code",
          "expr": "sum by (protocol) (\r\n    max_over_time(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route=\"$route\", method=\"$method\"}[$__rate_interval])\r\n  )",
          "legendFormat": "{{protocol}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Requests HTTP Protocol",
      "type": "stat"
    }
  ],
  "refresh": "",
  "revision": 1,
  "schemaVersion": 38,
  "style": "dark",
  "tags": [
    "dotnet",
    "prometheus",
    "aspnetcore"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
        },
        "definition": "label_values(http_server_current_requests, job)",
        "hide": 0,
        "includeAll": false,
        "label": "Job",
        "multi": false,
        "name": "job",
        "options": [],
        "query": {
          "query": "label_values(http_server_current_requests, job)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
        },
        "definition": "label_values(http_server_current_requests{job=~\"$job\"}, instance)",
        "hide": 0,
        "includeAll": false,
        "label": "Instance",
        "multi": false,
        "name": "instance",
        "options": [],
        "query": {
          "query": "label_values(http_server_current_requests{job=~\"$job\"}, instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
        },
        "definition": "label_values(http_server_request_duration_s_count, route)",
        "description": "Route",
        "hide": 0,
        "includeAll": false,
        "label": "Route",
        "multi": false,
        "name": "route",
        "options": [],
        "query": {
          "query": "label_values(http_server_request_duration_s_count, route)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}"
        },
        "definition": "label_values(http_server_request_duration_s_count{route=~\"$route\"}, method)",
        "hide": 0,
        "includeAll": false,
        "label": "Method",
        "multi": false,
        "name": "method",
        "options": [],
        "query": {
          "query": "label_values(http_server_request_duration_s_count{route=~\"$route\"}, method)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "ASP.NET Core Endpoint",
  "uid": "NagEsjE4z",
  "version": 10,
  "weekStart": ""
}
