From 7c423e791e168b7454e996f5a6eab05ac4a60e33 Mon Sep 17 00:00:00 2001 From: devrimdemiroz Date: Thu, 9 Mar 2023 23:54:55 +0100 Subject: [PATCH 1/4] spanmetrics dashboard premiere --- .../general/spanmetrics-dashboard.json | 804 ++++++++++++++++++ 1 file changed, 804 insertions(+) create mode 100644 src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json diff --git a/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json b/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json new file mode 100644 index 0000000000..49fb178bdf --- /dev/null +++ b/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json @@ -0,0 +1,804 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C", + "label": "Prometheus ws-5e6873a2-6e37-4e82-9a6e-a50d446e628c", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.4.7" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "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" + } + ] + }, + "description": "Spanmetrics way of application view. (contact Devrim Demiroz)", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "iteration": 1677577549933, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 14, + "panels": [], + "title": "Throughput", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "bRate" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "color", + "value": { + "mode": "continuous-BlYlRd" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "eRate" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "lcd-gauge" + }, + { + "id": "color", + "value": { + "mode": "continuous-RdYlGr" + } + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 22, + "interval": "5m", + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "exemplar": false, + "expr": "topk(10, sum(rate(calls_total{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__range])) by (operation,service_name)) ", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "Rate" + }, + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "exemplar": false, + "expr": "topk(10, sum(rate(calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__range])) by (operation,service_name))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "Error Rate" + } + ], + "title": "Top 7 Operations and Errors (APM Table)", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "operation" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time 1": true, + "Time 2": true + }, + "indexByName": {}, + "renameByName": { + "Value #Error Rate": "Error Rate", + "Value #Rate": "Rate", + "service_name 1": "Rate in Service", + "service_name 2": "Error Rate in Service" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "bRate", + "mode": "reduceRow", + "reduce": { + "include": [ + "Rate" + ], + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "eRate", + "mode": "reduceRow", + "reduce": { + "include": [ + "Error Rate" + ], + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Error Rate": true, + "Rate": true, + "bRate": false + }, + "indexByName": { + "Error Rate": 4, + "Rate": 1, + "bRate": 2, + "eRate": 3, + "operation": 0 + }, + "renameByName": { + "bRate": "Rate", + "eRate": "Error Rate", + "operation": "Operation Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-blue", + "value": 1 + }, + { + "color": "#EAB839", + "value": 2 + }, + { + "color": "red", + "value": 10 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 4, + "interval": "5m", + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,sum by (service_name) (rate( calls_total{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])))", + "interval": "", + "legendFormat": "{{service_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Top 7 Services Mean Rate over Range", + "transformations": [], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-YlRd" + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "red", + "value": 15 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 15, + "interval": "5m", + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate( calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__range])) by (service_name)", + "interval": "", + "legendFormat": "{{service_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Top 7 Services Mean ERROR Rate over Range", + "transformations": [], + "type": "bargauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 20, + "panels": [], + "title": "Latencies", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 2 + }, + { + "color": "#EAB839", + "value": 64 + }, + { + "color": "orange", + "value": 128 + }, + { + "color": "red", + "value": 256 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 2, + "interval": "5m", + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.50, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name)))", + "format": "time_series", + "hide": true, + "instant": false, + "interval": "", + "legendFormat": "{{service_name}}-quantile_0.50", + "range": true, + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name)))", + "hide": false, + "interval": "", + "legendFormat": "{{le}} - {{service_name}}", + "range": true, + "refId": "B" + }, + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.99, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile99", + "range": true, + "refId": "C" + }, + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.999, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile999", + "range": true, + "refId": "D" + } + ], + "title": "Top 3x3 - Service Latency - quantile95", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 10, + "interval": "5m", + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "topk(7, sum by (operation,service_name)(increase(latency_sum{service_name=~\"${service}\", operation=~\"$operation\",env=~\"$env\"}[5m]) / increase(latency_count{service_name=~\"${service}\",operation=~\"$operation\",env=~\"$env\"}[5m\n])))", + "interval": "", + "legendFormat": "{{operation}} [{{service_name}}]", + "range": true, + "refId": "A" + } + ], + "title": "Top 7 Highest Endpoint Latencies Mean Over Range ", + "transformations": [], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 15, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 22, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 16, + "interval": "5m", + "options": { + "legend": { + "calcs": [ + "mean", + "logmin", + "max", + "delta" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,sum by (operation,service_name)(increase(latency_sum{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval]) / increase(latency_count{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])))", + "interval": "", + "legendFormat": "[{{service_name}}] - {{operation}}-", + "range": true, + "refId": "A" + } + ], + "title": "Top 7 Latencies Over Range ", + "type": "timeseries" + } + ], + "refresh": "5m", + "schemaVersion": 35, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": ".*", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "definition": "query_result(count by (service_name)(count_over_time(calls_total[$__range])))", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "service", + "options": [], + "query": { + "query": "query_result(count by (service_name)(count_over_time(calls_total[$__range])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*service_name=\"(.*)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "definition": "query_result(sum ({__name__=~\".*calls_total\",service_name=~\"$service\"}) by (operation))", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "operation", + "options": [], + "query": { + "query": "query_result(sum ({__name__=~\".*calls_total\",service_name=~\"$service\"}) by (operation))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*operation=\"(.*)\".*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + }, + "definition": "label_values(env)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "env", + "options": [], + "query": { + "query": "label_values(env)", + "refId": "Prometheus ws-5e6873a2-6e37-4e82-9a6e-a50d446e628c-env-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Spanmetrics 7 Dashboard", + "uid": "W2gX2zHVk47", + "version": 22, + "weekStart": "" +} \ No newline at end of file From f6d140c1a5969a2dab3fe89676d2b6aecc43ceef Mon Sep 17 00:00:00 2001 From: devrimdemiroz Date: Fri, 10 Mar 2023 00:15:42 +0100 Subject: [PATCH 2/4] cleaned up unnecessary datasources mistake --- .../general/spanmetrics-dashboard.json | 741 +++++++++++------- 1 file changed, 470 insertions(+), 271 deletions(-) diff --git a/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json b/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json index 49fb178bdf..187a0ab13d 100644 --- a/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json +++ b/src/grafana/provisioning/dashboards/general/spanmetrics-dashboard.json @@ -1,53 +1,4 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C", - "label": "Prometheus ws-5e6873a2-6e37-4e82-9a6e-a50d446e628c", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": [], - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.4.7" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], "annotations": { "list": [ { @@ -70,33 +21,343 @@ } ] }, - "description": "Spanmetrics way of application view. (contact Devrim Demiroz)", + "description": "Spanmetrics way of demo application view.", + "author": { + "name": "devrimdemiroz" + }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1677577549933, "links": [], "liveNow": false, "panels": [ { "collapsed": false, - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, + "id": 24, + "panels": [], + "title": "Service Level - Throughput and Latencies", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 2 + }, + { + "color": "#EAB839", + "value": 64 + }, + { + "color": "orange", + "value": 128 + }, + { + "color": "red", + "value": 256 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 20, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 2, + "interval": "5m", + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.50, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])) by (le,service_name)))", + "format": "time_series", + "hide": true, + "instant": false, + "interval": "", + "legendFormat": "{{service_name}}-quantile_0.50", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__range])) by (le,service_name)))", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{le}} - {{service_name}}", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.99, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile99", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.999, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])) by (le,service_name))", + "hide": true, + "interval": "", + "legendFormat": "quantile999", + "range": true, + "refId": "D" + } + ], + "title": "Top 3x3 - Service Latency - quantile95", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-blue", + "value": 1 + }, + { + "color": "#EAB839", + "value": 2 + }, + { + "color": "red", + "value": 10 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "interval": "5m", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,sum by (service_name) (rate( calls_total{service_name=~\"$service\", operation=~\"$operation\"}[$__range])))", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "{{service_name}}", + "range": false, + "refId": "A" + } + ], + "title": "Top 7 Services Mean Rate over Range", + "transformations": [], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-reds" + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "red", + "value": 15 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 15, + "interval": "5m", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(7,sum(rate( calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", operation=~\"$operation\"}[$__range])) by (service_name))", + "instant": true, + "interval": "", + "legendFormat": "{{service_name}}", + "range": false, + "refId": "A" + } + ], + "title": "Top 7 Services Mean ERROR Rate over Range", + "transformations": [], + "type": "bargauge" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, "id": 14, "panels": [], - "title": "Throughput", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "refId": "A" + } + ], + "title": "Operations Level - Throughput", "type": "row" }, { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + "uid": "webstore-metrics" }, "description": "", "fieldConfig": { @@ -106,7 +367,8 @@ }, "custom": { "align": "auto", - "displayMode": "auto" + "displayMode": "auto", + "inspect": false }, "decimals": 2, "mappings": [], @@ -161,14 +423,50 @@ } } ] + }, + { + "matcher": { + "id": "byName", + "options": "Error Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 663 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 667 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Service" + }, + "properties": [ + { + "id": "custom.width", + "value": null + } + ] } ] }, "gridPos": { - "h": 10, + "h": 11, "w": 24, "x": 0, - "y": 1 + "y": 22 }, "id": 22, "interval": "5m", @@ -180,14 +478,18 @@ ], "show": false }, - "showHeader": true + "showHeader": true, + "sortBy": [] }, - "pluginVersion": "8.4.7", + "pluginVersion": "9.1.0", "targets": [ { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "exemplar": false, - "expr": "topk(10, sum(rate(calls_total{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__range])) by (operation,service_name)) ", + "expr": "topk(7, sum(rate(calls_total{service_name=~\"$service\", operation=~\"$operation\"}[$__range])) by (operation,service_name)) ", "format": "table", "instant": true, "interval": "", @@ -195,9 +497,12 @@ "refId": "Rate" }, { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "exemplar": false, - "expr": "topk(10, sum(rate(calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__range])) by (operation,service_name))", + "expr": "topk(7, sum(rate(calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", operation=~\"$operation\"}[$__range])) by (operation,service_name))", "format": "table", "hide": false, "instant": true, @@ -266,189 +571,71 @@ }, "indexByName": { "Error Rate": 4, + "Error Rate in Service": 6, "Rate": 1, + "Rate in Service": 5, "bRate": 2, "eRate": 3, "operation": 0 }, "renameByName": { + "Rate in Service": "Service", "bRate": "Rate", "eRate": "Error Rate", "operation": "Operation Name" } } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-BlYlRd" - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "super-light-blue", - "value": 1 - }, - { - "color": "#EAB839", - "value": 2 - }, - { - "color": "red", - "value": 10 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 11 - }, - "id": 4, - "interval": "5m", - "options": { - "displayMode": "lcd", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.4.7", - "targets": [ { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", - "editorMode": "code", - "exemplar": false, - "expr": "topk(7,sum by (service_name) (rate( calls_total{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])))", - "interval": "", - "legendFormat": "{{service_name}}", - "range": true, - "refId": "A" - } - ], - "title": "Top 7 Services Mean Rate over Range", - "transformations": [], - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd" - }, - "decimals": 4, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 1 - }, + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ { - "color": "red", - "value": 15 + "desc": true, + "field": "Rate" } ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 11 - }, - "id": 15, - "interval": "5m", - "options": { - "displayMode": "lcd", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.4.7", - "targets": [ - { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", - "editorMode": "code", - "exemplar": false, - "expr": "sum(rate( calls_total{status_code=\"STATUS_CODE_ERROR\",service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__range])) by (service_name)", - "interval": "", - "legendFormat": "{{service_name}}", - "range": true, - "refId": "A" + } } ], - "title": "Top 7 Services Mean ERROR Rate over Range", - "transformations": [], - "type": "bargauge" + "type": "table" }, { "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 19 + "y": 33 }, "id": 20, "panels": [], - "title": "Latencies", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "refId": "A" + } + ], + "title": "Operation Level - Latencies", "type": "row" }, { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + "uid": "webstore-metrics" }, "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "mode": "continuous-BlYlRd" }, "mappings": [], "thresholds": { @@ -481,12 +668,12 @@ "overrides": [] }, "gridPos": { - "h": 14, + "h": 13, "w": 12, "x": 0, - "y": 20 + "y": 34 }, - "id": 2, + "id": 25, "interval": "5m", "options": { "orientation": "auto", @@ -500,13 +687,16 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "8.4.7", + "pluginVersion": "9.1.0", "targets": [ { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "editorMode": "code", "exemplar": false, - "expr": "topk(7,histogram_quantile(0.50, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name)))", + "expr": "topk(7,histogram_quantile(0.50, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])) by (le,service_name)))", "format": "time_series", "hide": true, "instant": false, @@ -516,21 +706,28 @@ "refId": "A" }, { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "editorMode": "code", "exemplar": false, - "expr": "topk(7,histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name)))", + "expr": "topk(7,histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__range])) by (le,operation)))", "hide": false, + "instant": true, "interval": "", - "legendFormat": "{{le}} - {{service_name}}", - "range": true, + "legendFormat": "{{operation}}", + "range": false, "refId": "B" }, { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.99, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name))", + "expr": "histogram_quantile(0.99, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])) by (le,service_name))", "hide": true, "interval": "", "legendFormat": "quantile99", @@ -538,10 +735,13 @@ "refId": "C" }, { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.999, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])) by (le,service_name))", + "expr": "histogram_quantile(0.999, sum(rate(latency_bucket{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])) by (le,service_name))", "hide": true, "interval": "", "legendFormat": "quantile999", @@ -549,13 +749,13 @@ "refId": "D" } ], - "title": "Top 3x3 - Service Latency - quantile95", + "title": "Top 3x3 - Operation Latency - quantile95", "type": "gauge" }, { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + "uid": "webstore-metrics" }, "fieldConfig": { "defaults": { @@ -582,15 +782,17 @@ "overrides": [] }, "gridPos": { - "h": 14, + "h": 13, "w": 12, "x": 12, - "y": 20 + "y": 34 }, "id": 10, "interval": "5m", "options": { "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -601,16 +803,20 @@ }, "showUnfilled": true }, - "pluginVersion": "8.4.7", + "pluginVersion": "9.1.0", "targets": [ { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "editorMode": "code", "exemplar": false, - "expr": "topk(7, sum by (operation,service_name)(increase(latency_sum{service_name=~\"${service}\", operation=~\"$operation\",env=~\"$env\"}[5m]) / increase(latency_count{service_name=~\"${service}\",operation=~\"$operation\",env=~\"$env\"}[5m\n])))", + "expr": "topk(7, sum by (operation,service_name)(increase(latency_sum{service_name=~\"${service}\", operation=~\"$operation\"}[5m]) / increase(latency_count{service_name=~\"${service}\",operation=~\"$operation\"}[5m\n])))", + "instant": true, "interval": "", "legendFormat": "{{operation}} [{{service_name}}]", - "range": true, + "range": false, "refId": "A" } ], @@ -621,7 +827,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + "uid": "webstore-metrics" }, "fieldConfig": { "defaults": { @@ -629,6 +835,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -675,10 +883,10 @@ "overrides": [] }, "gridPos": { - "h": 22, + "h": 12, "w": 24, "x": 0, - "y": 34 + "y": 47 }, "id": 16, "interval": "5m", @@ -691,7 +899,8 @@ "delta" ], "displayMode": "table", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "single", @@ -701,12 +910,16 @@ "pluginVersion": "8.4.7", "targets": [ { - "datasource": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}", + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, "editorMode": "code", - "exemplar": false, - "expr": "topk(7,sum by (operation,service_name)(increase(latency_sum{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval]) / increase(latency_count{service_name=~\"$service\", operation=~\"$operation\",env=~\"$env\"}[$__rate_interval])))", + "exemplar": true, + "expr": "topk(7,sum by (operation,service_name)(increase(latency_sum{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval]) / increase(latency_count{service_name=~\"$service\", operation=~\"$operation\"}[$__rate_interval])))", + "instant": false, "interval": "", - "legendFormat": "[{{service_name}}] - {{operation}}-", + "legendFormat": "[{{service_name}}] {{operation}}", "range": true, "refId": "A" } @@ -716,17 +929,21 @@ } ], "refresh": "5m", - "schemaVersion": 35, + "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [ { "allValue": ".*", - "current": {}, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + "uid": "webstore-metrics" }, "definition": "query_result(count by (service_name)(count_over_time(calls_total[$__range])))", "hide": 0, @@ -746,10 +963,14 @@ }, { "allValue": ".*", - "current": {}, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" + "uid": "webstore-metrics" }, "definition": "query_result(sum ({__name__=~\".*calls_total\",service_name=~\"$service\"}) by (operation))", "hide": 0, @@ -766,28 +987,6 @@ "skipUrlSync": false, "sort": 0, "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS_WS-5E6873A2-6E37-4E82-9A6E-A50D446E628C}" - }, - "definition": "label_values(env)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "env", - "options": [], - "query": { - "query": "label_values(env)", - "refId": "Prometheus ws-5e6873a2-6e37-4e82-9a6e-a50d446e628c-env-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "type": "query" } ] }, @@ -797,8 +996,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Spanmetrics 7 Dashboard", - "uid": "W2gX2zHVk47", - "version": 22, + "title": "Spanmetrics Demo Dashboard", + "uid": "W2gX2zHVk48", + "version": 1, "weekStart": "" -} \ No newline at end of file +} From 286368a3aca29cfc4879f3cce94a413cc8ff5563 Mon Sep 17 00:00:00 2001 From: devrimdemiroz Date: Fri, 10 Mar 2023 00:25:07 +0100 Subject: [PATCH 3/4] pr #787 added to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e54a4df70a..3cdb744123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ tls_certificate_check and bump to OTP-25 ([#764](https://github.com/open-telemetry/opentelemetry-demo/pull/764)) * [chore] align memory limits with Helm chart ([#781](https://github.com/open-telemetry/opentelemetry-demo/pull/781)) +* Sample spanmetrics dashboard showing service and operational level throughputs and latencies +([#787](https://github.com/open-telemetry/opentelemetry-demo/pull/787)) ## v0.1.0 From 2d9d8410d247df1075352ed4967c0ef1758cdad2 Mon Sep 17 00:00:00 2001 From: devrimdemiroz Date: Fri, 10 Mar 2023 00:27:49 +0100 Subject: [PATCH 4/4] markdown check fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cdb744123..002f40a83a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ tls_certificate_check and bump to OTP-25 ([#764](https://github.com/open-telemetry/opentelemetry-demo/pull/764)) * [chore] align memory limits with Helm chart ([#781](https://github.com/open-telemetry/opentelemetry-demo/pull/781)) -* Sample spanmetrics dashboard showing service and operational level throughputs and latencies +* spanmetrics dashboard service&operation rates%latencies ([#787](https://github.com/open-telemetry/opentelemetry-demo/pull/787)) ## v0.1.0