{
  "annotations": { "list": [] },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "links": [],
  "panels": [
    {
      "title": "All Service Logs",
      "type": "logs",
      "gridPos": { "h": 12, "w": 24, "x": 0, "y": 0 },
      "datasource": { "type": "loki", "uid": "loki" },
      "targets": [
        {
          "expr": "{compose_service=~\".+\"}",
          "refId": "A"
        }
      ],
      "options": {
        "showTime": true,
        "showLabels": true,
        "showCommonLabels": false,
        "wrapLogMessage": true,
        "prettifyLogMessage": false,
        "enableLogDetails": true,
        "sortOrder": "Descending",
        "dedupStrategy": "none"
      }
    },
    {
      "title": "Logs by Service",
      "type": "logs",
      "gridPos": { "h": 10, "w": 12, "x": 0, "y": 12 },
      "datasource": { "type": "loki", "uid": "loki" },
      "targets": [
        {
          "expr": "{compose_service=\"backend\"}",
          "refId": "A",
          "legendFormat": "backend"
        }
      ],
      "options": {
        "showTime": true,
        "showLabels": true,
        "wrapLogMessage": true,
        "enableLogDetails": true,
        "sortOrder": "Descending"
      }
    },
    {
      "title": "Platform Service Logs",
      "type": "logs",
      "gridPos": { "h": 10, "w": 12, "x": 12, "y": 12 },
      "datasource": { "type": "loki", "uid": "loki" },
      "targets": [
        {
          "expr": "{compose_service=\"platform-service\"}",
          "refId": "A"
        }
      ],
      "options": {
        "showTime": true,
        "showLabels": true,
        "wrapLogMessage": true,
        "enableLogDetails": true,
        "sortOrder": "Descending"
      }
    },
    {
      "title": "Error Rate (all services)",
      "type": "timeseries",
      "gridPos": { "h": 8, "w": 24, "x": 0, "y": 22 },
      "datasource": { "type": "loki", "uid": "loki" },
      "targets": [
        {
          "expr": "sum by (compose_service) (rate({compose_service=~\".+\"} |= \"error\" [5m]))",
          "refId": "A",
          "legendFormat": "{{compose_service}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 15,
            "pointSize": 5
          },
          "unit": "reqps"
        }
      }
    },
    {
      "title": "Log Volume by Service",
      "type": "timeseries",
      "gridPos": { "h": 8, "w": 24, "x": 0, "y": 30 },
      "datasource": { "type": "loki", "uid": "loki" },
      "targets": [
        {
          "expr": "sum by (compose_service) (rate({compose_service=~\".+\"} [5m]))",
          "refId": "A",
          "legendFormat": "{{compose_service}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "bars",
            "lineWidth": 1,
            "fillOpacity": 50,
            "stacking": { "mode": "normal" }
          },
          "unit": "reqps"
        }
      }
    }
  ],
  "schemaVersion": 39,
  "tags": ["lysnrai", "logs", "monitoring"],
  "templating": { "list": [] },
  "time": { "from": "now-1h", "to": "now" },
  "timepicker": {},
  "timezone": "browser",
  "title": "LysnrAI — Service Logs",
  "uid": "lysnrai-service-logs",
  "version": 1
}
