{
  "annotations": [
    {
      "kind": "AnnotationQuery",
      "spec": {
        "builtIn": true,
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "query": {
          "datasource": {
            "name": "-- Grafana --"
          },
          "group": "grafana",
          "kind": "DataQuery",
          "spec": {},
          "version": "v0"
        }
      }
    }
  ],
  "cursorSync": "Off",
  "editable": true,
  "elements": {
    "panel-1": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "${datasource}"
                    },
                    "group": "prometheus",
                    "kind": "DataQuery",
                    "spec": {
                      "editorMode": "code",
                      "expr": "(sum by (service) (count_over_time(github_workflow_job_run_total{conclusion=\"success\", environment=\"production\"}[1h])) / sum by (service) (count_over_time(github_workflow_job_run_total{environment=\"production\"}[1h]))) * 100",
                      "legendFormat": "{{service}}",
                      "range": true
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 1,
        "links": [],
        "title": "Build/Deployment Success Rate",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "palette-classic"
                },
                "custom": {
                  "axisBorderShow": false,
                  "axisCenteredZero": false,
                  "axisColorMode": "text",
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "barWidthFactor": 0.6,
                  "drawStyle": "line",
                  "fillOpacity": 20,
                  "gradientMode": "none",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "insertNulls": false,
                  "lineInterpolation": "linear",
                  "lineWidth": 2,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "never",
                  "showValues": false,
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "off"
                  }
                },
                "max": 100,
                "min": 0,
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": 0
                    },
                    {
                      "color": "yellow",
                      "value": 80
                    },
                    {
                      "color": "green",
                      "value": 95
                    }
                  ]
                },
                "unit": "percent"
              },
              "overrides": []
            },
            "options": {
              "annotations": {
                "clustering": -1,
                "multiLane": false
              },
              "legend": {
                "calcs": ["lastNotNull", "mean"],
                "displayMode": "table",
                "enableFacetedFilter": false,
                "overflow": "ellipsis",
                "placement": "bottom",
                "showLegend": true
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "single",
                "sort": "none"
              }
            }
          },
          "version": "13.2.0-29079983887"
        }
      }
    },
    "panel-2": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "${datasource}"
                    },
                    "group": "prometheus",
                    "kind": "DataQuery",
                    "spec": {
                      "editorMode": "code",
                      "expr": "avg by (service) (github_workflow_job_duration_seconds{environment=\"production\"})",
                      "legendFormat": "{{service}}",
                      "range": true
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 2,
        "links": [],
        "title": "Average Workflow Duration",
        "vizConfig": {
          "group": "bargauge",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds"
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "yellow",
                      "value": 300
                    },
                    {
                      "color": "red",
                      "value": 600
                    }
                  ]
                },
                "unit": "s"
              },
              "overrides": []
            },
            "options": {
              "displayLabels": ["name", "value"],
              "displayMode": "gradient",
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "overflow": "ellipsis",
                "placement": "bottom",
                "showLegend": false
              },
              "maxVizHeight": 300,
              "minVizHeight": 16,
              "minVizWidth": 8,
              "namePlacement": "auto",
              "orientation": "horizontal",
              "reduceOptions": {
                "calcs": ["lastNotNull"],
                "fields": "",
                "values": false
              },
              "showThresholdLabels": false,
              "showThresholdMarkers": true,
              "showUnfilled": true,
              "sizing": "auto",
              "valueMode": "color"
            }
          },
          "version": "13.2.0-29079983887"
        }
      }
    },
    "panel-3": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "${datasource}"
                    },
                    "group": "prometheus",
                    "kind": "DataQuery",
                    "spec": {
                      "editorMode": "code",
                      "expr": "sum(count_over_time(github_workflow_job_run_total{service=\"app\",  environment=\"production\"}[1d]))",
                      "legendFormat": "Deployments",
                      "range": true
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 3,
        "links": [],
        "title": "Deployments Today",
        "vizConfig": {
          "group": "stat",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds"
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    },
                    {
                      "color": "red",
                      "value": 1
                    }
                  ]
                },
                "unit": "short"
              },
              "overrides": []
            },
            "options": {
              "colorMode": "value",
              "graphMode": "area",
              "justifyMode": "auto",
              "orientation": "auto",
              "percentChangeColorMode": "standard",
              "reduceOptions": {
                "calcs": ["lastNotNull"],
                "fields": "",
                "values": false
              },
              "showPercentChange": false,
              "textMode": "auto",
              "wideLayout": true
            }
          },
          "version": "13.2.0-29079983887"
        }
      }
    },
    "panel-4": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "${datasource}"
                    },
                    "group": "prometheus",
                    "kind": "DataQuery",
                    "spec": {
                      "editorMode": "code",
                      "expr": "(sum(count_over_time(github_workflow_job_run_total{service=\"app\", conclusion=\"success\", environment=\"production\"}[1d])) / sum(count_over_time(github_workflow_job_run_total{service=\"app\", environment=\"production\"}[1d]))) * 100",
                      "legendFormat": "Success Rate",
                      "range": true
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 4,
        "links": [],
        "title": "Deployment Success Rate",
        "vizConfig": {
          "group": "stat",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "thresholds"
                },
                "max": 100,
                "min": 0,
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": 0
                    },
                    {
                      "color": "yellow",
                      "value": 90
                    },
                    {
                      "color": "green",
                      "value": 95
                    }
                  ]
                },
                "unit": "percent"
              },
              "overrides": []
            },
            "options": {
              "colorMode": "value",
              "graphMode": "area",
              "justifyMode": "auto",
              "orientation": "auto",
              "percentChangeColorMode": "standard",
              "reduceOptions": {
                "calcs": ["lastNotNull"],
                "fields": "",
                "values": false
              },
              "showPercentChange": false,
              "textMode": "auto",
              "wideLayout": true
            }
          },
          "version": "13.2.0-29079983887"
        }
      }
    },
    "panel-5": {
      "kind": "Panel",
      "spec": {
        "data": {
          "kind": "QueryGroup",
          "spec": {
            "queries": [
              {
                "kind": "PanelQuery",
                "spec": {
                  "hidden": false,
                  "query": {
                    "datasource": {
                      "name": "${datasource}"
                    },
                    "group": "prometheus",
                    "kind": "DataQuery",
                    "spec": {
                      "editorMode": "code",
                      "expr": "sum by (service) (count_over_time(github_workflow_job_run_total{environment=\"production\"}[1d]))",
                      "legendFormat": "{{service}}",
                      "range": true
                    },
                    "version": "v0"
                  },
                  "refId": "A"
                }
              }
            ],
            "queryOptions": {},
            "transformations": []
          }
        },
        "description": "",
        "id": 5,
        "links": [],
        "title": "Deployment Frequency by Service",
        "vizConfig": {
          "group": "timeseries",
          "kind": "VizConfig",
          "spec": {
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "palette-classic"
                },
                "custom": {
                  "axisBorderShow": false,
                  "axisCenteredZero": false,
                  "axisColorMode": "text",
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "barWidthFactor": 0.6,
                  "drawStyle": "bars",
                  "fillOpacity": 100,
                  "gradientMode": "none",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "insertNulls": false,
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "never",
                  "showValues": false,
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "normal"
                  },
                  "thresholdsStyle": {
                    "mode": "off"
                  }
                },
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": 0
                    }
                  ]
                }
              },
              "overrides": []
            },
            "options": {
              "annotations": {
                "clustering": -1,
                "multiLane": false
              },
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "enableFacetedFilter": false,
                "overflow": "ellipsis",
                "placement": "bottom",
                "showLegend": true
              },
              "tooltip": {
                "hideZeros": false,
                "mode": "multi",
                "sort": "none"
              }
            }
          },
          "version": "13.2.0-29079983887"
        }
      }
    }
  },
  "layout": {
    "kind": "GridLayout",
    "spec": {
      "items": [
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-1"
            },
            "height": 10,
            "width": 12,
            "x": 0,
            "y": 0
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-2"
            },
            "height": 10,
            "width": 12,
            "x": 12,
            "y": 0
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-3"
            },
            "height": 8,
            "width": 8,
            "x": 0,
            "y": 10
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-4"
            },
            "height": 8,
            "width": 8,
            "x": 8,
            "y": 10
          }
        },
        {
          "kind": "GridLayoutItem",
          "spec": {
            "element": {
              "kind": "ElementReference",
              "name": "panel-5"
            },
            "height": 8,
            "width": 8,
            "x": 16,
            "y": 10
          }
        }
      ]
    }
  },
  "links": [],
  "liveNow": false,
  "preload": false,
  "tags": ["github-actions", "staging", "build", "deployment"],
  "timeSettings": {
    "autoRefresh": "30s",
    "autoRefreshIntervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "fiscalYearStartMonth": 0,
    "from": "now-24h",
    "hideTimepicker": false,
    "timezone": "browser",
    "to": "now"
  },
  "title": "Production - Build & Deployment",
  "variables": [
    {
      "kind": "DatasourceVariable",
      "spec": {
        "allowCustomValue": true,
        "current": {
          "text": "grafanacloud-deltafarmcove-prom",
          "value": "grafanacloud-prom"
        },
        "hide": "dontHide",
        "includeAll": false,
        "label": "Data Source",
        "multi": false,
        "name": "datasource",
        "options": [],
        "pluginId": "prometheus",
        "refresh": "onDashboardLoad",
        "regex": "",
        "skipUrlSync": false
      }
    },
    {
      "kind": "QueryVariable",
      "spec": {
        "allowCustomValue": true,
        "current": {
          "text": "All",
          "value": ["$__all"]
        },
        "definition": "label_values(github_workflow_job_run_total{environment=\"staging\"}, service)",
        "hide": "dontHide",
        "includeAll": true,
        "label": "Service",
        "multi": true,
        "name": "service",
        "options": [],
        "query": {
          "datasource": {
            "name": "${datasource}"
          },
          "group": "prometheus",
          "kind": "DataQuery",
          "spec": {
            "query": "label_values(github_workflow_job_run_total{environment=\"staging\"}, service)",
            "refId": "StandardVariableQuery"
          },
          "version": "v0"
        },
        "refresh": "onDashboardLoad",
        "regex": "",
        "regexApplyTo": "value",
        "skipUrlSync": false,
        "sort": "disabled"
      }
    }
  ]
}
