{
  "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": 54,
  "links": [],
  "panels": [
    {
      "datasource": {
        "type": "loki",
        "uid": "grafanacloud-logs"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 3,
      "options": {
        "legend": {
          "calcs": ["mean", "count"],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "11.2.0-74515",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "grafanacloud-logs"
          },
          "editorMode": "builder",
          "expr": "avg by(container_name) (rate({env=\"prod\"} |= `\"level\":50` [$__interval]))",
          "key": "Q-0eeded78-b26f-4d43-af08-3cadcd2261f2-0",
          "legendFormat": "{{container_name}}",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Errors over time (all services)",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 4,
      "panels": [],
      "repeat": "service",
      "title": "$service",
      "type": "row"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "grafanacloud-logs"
      },
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 5,
      "options": {
        "dedupStrategy": "none",
        "enableLogDetails": true,
        "prettifyLogMessage": false,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": true,
        "sortOrder": "Descending",
        "wrapLogMessage": false
      },
      "pluginVersion": "11.2.0-74515",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "grafanacloud-logs"
          },
          "editorMode": "code",
          "expr": "{container_name=\"$service\"} | json | regexp `(?P<requestId>[a-f0-9-]{36})`| line_format \"{{ .msg }}\" | __error__ != `JSONParserErr` | level > 30",
          "hide": false,
          "key": "Q-4f74f5b0-5837-415a-b726-56138193c25e-0",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Recent Log Errors/Warnings of $service",
      "type": "logs"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "grafanacloud-logs"
      },
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 1,
      "options": {
        "dedupStrategy": "none",
        "enableLogDetails": true,
        "prettifyLogMessage": false,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": true,
        "sortOrder": "Descending",
        "wrapLogMessage": false
      },
      "pluginVersion": "11.2.0-74515",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "grafanacloud-logs"
          },
          "editorMode": "code",
          "expr": "{container_name=\"$service\"} | json | __error__ != `JSONParserErr` | regexp `(?P<requestId>[a-f0-9-]{36})` | line_format `{{ .msg }}`",
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Service Logs of $service",
      "type": "logs"
    }
  ],
  "preload": false,
  "refresh": "30s",
  "schemaVersion": 39,
  "tags": ["kubernetes", "logs"],
  "templating": {
    "list": [
      {
        "current": {
          "text": "graphql-api",
          "value": "graphql-api"
        },
        "datasource": {
          "type": "loki",
          "uid": "grafanacloud-logs"
        },
        "definition": "",
        "includeAll": false,
        "label": "Service:",
        "name": "service",
        "options": [],
        "query": {
          "label": "container_name",
          "refId": "LokiVariableQueryEditor-VariableQuery",
          "stream": "",
          "type": 1
        },
        "refresh": 1,
        "regex": "",
        "type": "query"
      },
      {
        "datasource": {
          "type": "loki",
          "uid": "grafanacloud-logs"
        },
        "filters": [],
        "name": "Filters",
        "type": "adhoc"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Container Logs",
  "uid": "ih6KH0aVz",
  "version": 9,
  "weekStart": ""
}
