Compare commits

..

No commits in common. "210685f044d0ba0ee47116a81939bd6b61c9bc59" and "f9f33dfd7a37b9ccecc307c4ccbfaaee55cf926c" have entirely different histories.

View File

@ -27,45 +27,9 @@
"type": "loki", "type": "loki",
"uid": "P8E80F9AEF21F6940" "uid": "P8E80F9AEF21F6940"
}, },
"description": "Trips generated over the period of time", "description": "Total Count of log lines in the specified time range",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Trips",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "bars",
"fillOpacity": 100,
"gradientMode": "hue",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "stepBefore",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [ "mappings": [
{ {
"options": { "options": {
@ -84,6 +48,14 @@
{ {
"color": "rgb(31, 255, 7)", "color": "rgb(31, 255, 7)",
"value": null "value": null
},
{
"color": "rgb(31, 255, 7)",
"value": 10
},
{
"color": "rgb(31, 255, 7)",
"value": 50
} }
] ]
}, },
@ -92,25 +64,29 @@
"overrides": [] "overrides": []
}, },
"gridPos": { "gridPos": {
"h": 6, "h": 3,
"w": 13, "w": 12,
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"id": 11, "id": 11,
"maxDataPoints": 100, "maxDataPoints": 100,
"options": { "options": {
"legend": { "colorMode": "value",
"calcs": [], "graphMode": "area",
"displayMode": "list", "justifyMode": "auto",
"placement": "bottom", "orientation": "horizontal",
"showLegend": false "percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
}, },
"tooltip": { "showPercentChange": false,
"hideZeros": false, "textMode": "auto",
"mode": "single", "wideLayout": true
"sort": "none"
}
}, },
"pluginVersion": "11.5.1", "pluginVersion": "11.5.1",
"targets": [ "targets": [
@ -119,29 +95,24 @@
"type": "loki", "type": "loki",
"uid": "P8E80F9AEF21F6940" "uid": "P8E80F9AEF21F6940"
}, },
"direction": "backward", "editorMode": "code",
"editorMode": "builder", "expr": "sum(count_over_time(({app=\"anyway\", environment=~\"$environment\"})[$__interval]))",
"expr": "sum(count_over_time({app=\"anyway\", environment=~\"$environment\"} |= `Generated a trip` [$__interval]))",
"hide": false, "hide": false,
"legendFormat": "trips generated",
"queryType": "range", "queryType": "range",
"refId": "generated trips" "refId": "A"
} }
], ],
"title": "Trips generated", "title": "Total Count of logs",
"type": "timeseries" "type": "stat"
}, },
{ {
"datasource": { "datasource": {
"type": "loki", "type": "loki",
"uid": "P8E80F9AEF21F6940" "uid": "P8E80F9AEF21F6940"
}, },
"description": "Successfully generated trips", "description": "Total Count: of $searchable_pattern in the specified time range",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [ "mappings": [
{ {
"options": { "options": {
@ -159,207 +130,10 @@
{ {
"color": "green", "color": "green",
"value": null "value": null
}
]
}, },
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 13,
"y": 0
},
"id": 23,
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.5.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"direction": "backward",
"editorMode": "builder",
"expr": "sum(count_over_time({app=\"anyway\", environment=~\"$environment\"} | json |= `Generated a trip` [$__interval]))",
"hide": false,
"queryType": "range",
"refId": "A"
}
],
"title": "Generated Trips",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"description": "Detailed distribution of error types",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "0"
}
},
"type": "special"
}
]
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 7,
"x": 17,
"y": 0
},
"id": 22,
"maxDataPoints": 100,
"options": {
"displayLabels": [
"value"
],
"legend": {
"displayMode": "list",
"placement": "right",
"showLegend": true,
"values": []
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"direction": "backward",
"editorMode": "code",
"expr": "sum(count_over_time(({app=\"anyway\", environment=~\"$environment\"}\n| json\n| detected_level =~ \"error\"\n| function =~ \"solve_optimization\"\n)[$__interval]))",
"hide": false,
"legendFormat": "Optimizer",
"queryType": "range",
"refId": "optimization_errors",
"step": ""
},
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"direction": "backward",
"editorMode": "code",
"expr": "sum(count_over_time(({app=\"anyway\", environment=~\"$environment\"}\n| json\n| detected_level =~ \"error\"\n| function =~ \"fill_cache\"\n)[$__interval]))",
"hide": false,
"legendFormat": "Cache",
"queryType": "range",
"refId": "cache_errors"
},
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"direction": "backward",
"editorMode": "builder",
"expr": "sum(count_over_time({app=\"anyway\", environment=~\"$environment\"} | json | detected_level =~ `error` |= `Overpass API` or `overpass API` [$__interval]))",
"hide": false,
"legendFormat": "Overpass API",
"queryType": "range",
"refId": "overpass"
},
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"direction": "backward",
"editorMode": "builder",
"expr": "sum(count_over_time({app=\"anyway\", environment=~\"$environment\"} | json | detected_level =~ `error` | function !~ `fill_cache` | function !~ `solve_optimization` != `Overpass API` or `overpass API` [$__interval]))",
"hide": false,
"legendFormat": "Other",
"queryType": "range",
"refId": "other"
}
],
"title": "Error detail",
"type": "piechart"
},
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"description": "Total count of log errors",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "0"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{ {
"color": "red", "color": "red",
"value": null "value": 80
} }
] ]
}, },
@ -369,17 +143,17 @@
}, },
"gridPos": { "gridPos": {
"h": 3, "h": 3,
"w": 4, "w": 12,
"x": 13, "x": 12,
"y": 3 "y": 0
}, },
"id": 6, "id": 6,
"maxDataPoints": 100, "maxDataPoints": 100,
"options": { "options": {
"colorMode": "value", "colorMode": "value",
"graphMode": "none", "graphMode": "area",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "horizontal",
"percentChangeColorMode": "standard", "percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
@ -399,15 +173,14 @@
"type": "loki", "type": "loki",
"uid": "P8E80F9AEF21F6940" "uid": "P8E80F9AEF21F6940"
}, },
"direction": "backward",
"editorMode": "code", "editorMode": "code",
"expr": "sum(count_over_time(({app=\"anyway\", environment=~\"$environment\"}\n| json\n| detected_level =~ \"error\"\n)[$__interval]))", "expr": "sum(count_over_time(({app=\"anyway\", environment=~\"$environment\"} |~ \"(?i)$searchable_pattern\")[$__interval]))",
"hide": false, "hide": false,
"queryType": "range", "queryType": "range",
"refId": "A" "refId": "A"
} }
], ],
"title": "Total error count", "title": "Total Count: of $searchable_pattern",
"type": "stat" "type": "stat"
}, },
{ {
@ -424,7 +197,7 @@
"h": 9, "h": 9,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 6 "y": 3
}, },
"id": 2, "id": 2,
"options": { "options": {
@ -447,7 +220,7 @@
}, },
"direction": "backward", "direction": "backward",
"editorMode": "code", "editorMode": "code",
"expr": "{app=\"anyway\", environment=~\"$environment\"} \n| json\n| name != \"uvicorn.access\"\n| detected_level =~ \"${LogLevel}\"\n| line_format \"{{ .message }}\"\n", "expr": "{app=\"anyway\", environment=~\"$environment\"} | json | name != \"uvicorn.access\" \n| detected_level=~\"(?i)^(debug|info|warn|error)$\" \n| detected_level=~\"(?i)$logLevel|info|warn|error\" | line_format \"{{ .message }}\"\n",
"hide": false, "hide": false,
"queryType": "range", "queryType": "range",
"refId": "A" "refId": "A"
@ -493,7 +266,7 @@
"h": 7, "h": 7,
"w": 9, "w": 9,
"x": 0, "x": 0,
"y": 15 "y": 12
}, },
"id": 19, "id": 19,
"maxDataPoints": 100, "maxDataPoints": 100,
@ -559,7 +332,7 @@
"h": 7, "h": 7,
"w": 9, "w": 9,
"x": 9, "x": 9,
"y": 15 "y": 12
}, },
"id": 20, "id": 20,
"interval": "1m", "interval": "1m",
@ -639,7 +412,7 @@
"h": 7, "h": 7,
"w": 6, "w": 6,
"x": 18, "x": 18,
"y": 15 "y": 12
}, },
"id": 9, "id": 9,
"maxDataPoints": 100, "maxDataPoints": 100,
@ -741,7 +514,7 @@
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 22 "y": 19
}, },
"id": 18, "id": 18,
"interval": "1m", "interval": "1m",
@ -844,7 +617,7 @@
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 22 "y": 19
}, },
"id": 10, "id": 10,
"maxDataPoints": 100, "maxDataPoints": 100,
@ -998,7 +771,7 @@
"h": 8, "h": 8,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 31 "y": 28
}, },
"id": 7, "id": 7,
"maxDataPoints": 100, "maxDataPoints": 100,
@ -1046,7 +819,7 @@
"h": 11, "h": 11,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 39 "y": 36
}, },
"id": 21, "id": 21,
"options": { "options": {
@ -1121,40 +894,29 @@
}, },
{ {
"current": { "current": {
"text": "|debug|info|warn|error", "text": "debug",
"value": "|debug|info|warn|error" "value": "debug"
}, },
"description": "Allows to filter the logs based on their level",
"name": "LogLevel", "name": "LogLevel",
"options": [ "options": [
{
"selected": true,
"text": "debug",
"value": "|debug|info|warn|error"
},
{ {
"selected": false, "selected": false,
"text": "info", "text": "info",
"value": "|info|warn|error" "value": "info"
}, },
{ {
"selected": false, "selected": true,
"text": "warn", "text": "debug",
"value": "|warn|error" "value": "debug"
},
{
"selected": false,
"text": "error",
"value": "|error"
} }
], ],
"query": "debug : |debug|info|warn|error , info : |info|warn|error , warn : |warn|error , error : |error", "query": "info, debug",
"type": "custom" "type": "custom"
} }
] ]
}, },
"time": { "time": {
"from": "now-7d", "from": "now-24h",
"to": "now" "to": "now"
}, },
"timepicker": { "timepicker": {
@ -1173,6 +935,6 @@
"timezone": "", "timezone": "",
"title": "AnyWay status", "title": "AnyWay status",
"uid": "fRIvzUZMz", "uid": "fRIvzUZMz",
"version": 2, "version": 1,
"weekStart": "" "weekStart": ""
} }