|
| 1 | +{ |
| 2 | + "title": "RELab — API", |
| 3 | + "uid": "relab-api", |
| 4 | + "schemaVersion": 39, |
| 5 | + "version": 1, |
| 6 | + "refresh": "30s", |
| 7 | + "time": { "from": "now-1h", "to": "now" }, |
| 8 | + "graphTooltip": 1, |
| 9 | + "tags": ["relab"], |
| 10 | + "panels": [ |
| 11 | + { |
| 12 | + "type": "row", |
| 13 | + "title": "Logs", |
| 14 | + "collapsed": false, |
| 15 | + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, |
| 16 | + "id": 1 |
| 17 | + }, |
| 18 | + { |
| 19 | + "type": "timeseries", |
| 20 | + "title": "Log Rate by Level", |
| 21 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 }, |
| 22 | + "id": 2, |
| 23 | + "datasource": { "type": "loki", "uid": "loki" }, |
| 24 | + "targets": [ |
| 25 | + { |
| 26 | + "expr": "sum by (detected_level) (rate({service_name=\"relab-api\"}[$__auto]))", |
| 27 | + "legendFormat": "{{detected_level}}", |
| 28 | + "refId": "A" |
| 29 | + } |
| 30 | + ], |
| 31 | + "fieldConfig": { |
| 32 | + "defaults": { |
| 33 | + "unit": "reqps", |
| 34 | + "custom": { "lineWidth": 2, "fillOpacity": 10 } |
| 35 | + }, |
| 36 | + "overrides": [ |
| 37 | + { |
| 38 | + "matcher": { "id": "byName", "options": "error" }, |
| 39 | + "properties": [{ "id": "color", "value": { "mode": "fixed", "fixedColor": "red" } }] |
| 40 | + }, |
| 41 | + { |
| 42 | + "matcher": { "id": "byName", "options": "critical" }, |
| 43 | + "properties": [{ "id": "color", "value": { "mode": "fixed", "fixedColor": "dark-red" } }] |
| 44 | + }, |
| 45 | + { |
| 46 | + "matcher": { "id": "byName", "options": "warning" }, |
| 47 | + "properties": [{ "id": "color", "value": { "mode": "fixed", "fixedColor": "orange" } }] |
| 48 | + }, |
| 49 | + { |
| 50 | + "matcher": { "id": "byName", "options": "info" }, |
| 51 | + "properties": [{ "id": "color", "value": { "mode": "fixed", "fixedColor": "blue" } }] |
| 52 | + } |
| 53 | + ] |
| 54 | + }, |
| 55 | + "options": { |
| 56 | + "tooltip": { "mode": "multi", "sort": "desc" }, |
| 57 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 58 | + } |
| 59 | + }, |
| 60 | + { |
| 61 | + "type": "logs", |
| 62 | + "title": "Log Stream", |
| 63 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 }, |
| 64 | + "id": 3, |
| 65 | + "datasource": { "type": "loki", "uid": "loki" }, |
| 66 | + "targets": [ |
| 67 | + { |
| 68 | + "expr": "{service_name=\"relab-api\"}", |
| 69 | + "refId": "A" |
| 70 | + } |
| 71 | + ], |
| 72 | + "options": { |
| 73 | + "dedupStrategy": "none", |
| 74 | + "showLabels": false, |
| 75 | + "wrapLogMessage": true, |
| 76 | + "prettifyLogMessage": false, |
| 77 | + "enableLogDetails": true, |
| 78 | + "sortOrder": "Descending" |
| 79 | + } |
| 80 | + }, |
| 81 | + { |
| 82 | + "type": "logs", |
| 83 | + "title": "Errors", |
| 84 | + "gridPos": { "h": 7, "w": 24, "x": 0, "y": 9 }, |
| 85 | + "id": 6, |
| 86 | + "datasource": { "type": "loki", "uid": "loki" }, |
| 87 | + "targets": [ |
| 88 | + { |
| 89 | + "expr": "{service_name=\"relab-api\", detected_level=~\"error|critical\"}", |
| 90 | + "refId": "A" |
| 91 | + } |
| 92 | + ], |
| 93 | + "options": { |
| 94 | + "dedupStrategy": "none", |
| 95 | + "showLabels": false, |
| 96 | + "wrapLogMessage": true, |
| 97 | + "enableLogDetails": true, |
| 98 | + "sortOrder": "Descending" |
| 99 | + } |
| 100 | + }, |
| 101 | + { |
| 102 | + "type": "row", |
| 103 | + "title": "Traces", |
| 104 | + "collapsed": false, |
| 105 | + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 16 }, |
| 106 | + "id": 4 |
| 107 | + }, |
| 108 | + { |
| 109 | + "type": "traces", |
| 110 | + "title": "Recent Traces", |
| 111 | + "gridPos": { "h": 12, "w": 24, "x": 0, "y": 17 }, |
| 112 | + "id": 5, |
| 113 | + "datasource": { "type": "tempo", "uid": "tempo" }, |
| 114 | + "targets": [ |
| 115 | + { |
| 116 | + "queryType": "traceql", |
| 117 | + "query": "{resource.service.name=\"relab-api\"}", |
| 118 | + "refId": "A", |
| 119 | + "tableType": "traces" |
| 120 | + } |
| 121 | + ], |
| 122 | + "options": { "frameType": "TraceqlSearch" } |
| 123 | + }, |
| 124 | + { |
| 125 | + "type": "traces", |
| 126 | + "title": "Failed Requests", |
| 127 | + "gridPos": { "h": 10, "w": 24, "x": 0, "y": 29 }, |
| 128 | + "id": 7, |
| 129 | + "datasource": { "type": "tempo", "uid": "tempo" }, |
| 130 | + "targets": [ |
| 131 | + { |
| 132 | + "queryType": "traceql", |
| 133 | + "query": "{resource.service.name=\"relab-api\" && status=error}", |
| 134 | + "refId": "A", |
| 135 | + "tableType": "traces" |
| 136 | + } |
| 137 | + ], |
| 138 | + "options": { "frameType": "TraceqlSearch" } |
| 139 | + } |
| 140 | + ], |
| 141 | + "templating": { "list": [] }, |
| 142 | + "annotations": { "list": [] } |
| 143 | +} |
0 commit comments