From 99d9f594e5d62eb554df857b96b31ac4cd0bcb84 Mon Sep 17 00:00:00 2001 From: Ana C Date: Tue, 26 Nov 2024 08:33:30 -0800 Subject: [PATCH] fix(graph-node: graph query perf dashboard (#420) * fix(graph-node): updating graph query perf overview dashboard --- charts/graph-node/Chart.yaml | 2 +- charts/graph-node/README.md | 2 +- .../query-performance-overview.json | 555 ++++++++++-------- 3 files changed, 304 insertions(+), 255 deletions(-) diff --git a/charts/graph-node/Chart.yaml b/charts/graph-node/Chart.yaml index 61bc2228..e013060d 100644 --- a/charts/graph-node/Chart.yaml +++ b/charts/graph-node/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.5.6 +version: 0.5.7 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/graph-node/README.md b/charts/graph-node/README.md index 3377f05b..d755c080 100644 --- a/charts/graph-node/README.md +++ b/charts/graph-node/README.md @@ -2,7 +2,7 @@ Deploy and scale [Graph Node](https://github.com/graphprotocol/graph-node) inside Kubernetes with ease -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.5.6](https://img.shields.io/badge/Version-0.5.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.35.1](https://img.shields.io/badge/AppVersion-v0.35.1-informational?style=flat-square) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.5.7](https://img.shields.io/badge/Version-0.5.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.35.1](https://img.shields.io/badge/AppVersion-v0.35.1-informational?style=flat-square) ## Introduction diff --git a/charts/graph-node/dashboards/query-performance-overview.json b/charts/graph-node/dashboards/query-performance-overview.json index c4a5cf55..eac780b2 100644 --- a/charts/graph-node/dashboards/query-performance-overview.json +++ b/charts/graph-node/dashboards/query-performance-overview.json @@ -1,4 +1,53 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "" + }, + { + "type": "panel", + "id": "histogram", + "name": "Histogram", + "version": "" + }, + { + "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": [ { @@ -24,13 +73,13 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, + "id": null, "links": [], - "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -78,55 +127,45 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "exemplar": false, - "expr": "sum(rate(indexer_service_queries_ok{namespace=\"${namespace}\"}[$__rate_interval]))", + "expr": "sum(rate(indexer_query_handler_seconds_count[$__rate_interval])) - sum(rate(indexer_query_handler_failed_total[$__rate_interval]))", "instant": true, - "interval": "", - "legendFormat": "OK (Instant)", - "range": false, + "legendFormat": "Successful Qs (Instant)", "refId": "A" }, { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "exemplar": false, - "expr": "sum(rate(indexer_service_queries_failed{namespace=\"${namespace}\"}[$__rate_interval]))", + "expr": "sum(rate(indexer_query_handler_failed_total[$__rate_interval]))", "instant": true, - "interval": "", - "legendFormat": "FAILED (Instant)", - "range": false, + "legendFormat": "Failed Qs (Instant)", "refId": "B" }, { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(rate(indexer_service_queries_ok{namespace=\"${namespace}\"}[$__rate_interval]))", - "hide": false, + "expr": "sum(rate(indexer_query_handler_seconds_count[$__rate_interval])) - sum(rate(indexer_query_handler_failed_total[$__rate_interval]))", "instant": false, - "legendFormat": "OK (Range)", - "range": true, + "legendFormat": "Successful Qs (Range)", "refId": "C" }, { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(rate(indexer_service_queries_failed{namespace=\"${namespace}\"}[$__rate_interval]))", - "hide": false, + "expr": "sum(rate(indexer_query_handler_failed_total[$__rate_interval]))", "instant": false, - "legendFormat": "FAILED (Range)", - "range": true, + "legendFormat": "Failed Qs (Range)", "refId": "D" } ], @@ -136,7 +175,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -150,6 +189,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -217,16 +257,16 @@ "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", - "expr": "sum by (deployment) (rate(indexer_service_queries_total{namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by (deployment) (rate(indexer_query_handler_seconds_count{namespace=\"$namespace\"}[$__rate_interval]))", "instant": false, - "legendFormat": "__auto", + "legendFormat": "{{deployment}}", "range": true, "refId": "A" } @@ -237,7 +277,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -251,6 +291,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -313,11 +354,12 @@ "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "sum(rate(query_cache_status_count{cache_status=~\"shared|hit\",namespace=\"${namespace}\"}[$__rate_interval])) /\nsum(rate(query_cache_status_count{namespace=\"${namespace}\"}[$__rate_interval])) * 100", @@ -333,7 +375,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -348,7 +390,11 @@ "tooltip": false, "viz": false }, - "lineWidth": 1 + "lineWidth": 1, + "stacking": { + "group": "A", + "mode": "none" + } }, "mappings": [], "thresholds": { @@ -381,13 +427,18 @@ "displayMode": "list", "placement": "bottom", "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -405,7 +456,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -420,7 +471,11 @@ "tooltip": false, "viz": false }, - "lineWidth": 1 + "lineWidth": 1, + "stacking": { + "group": "A", + "mode": "none" + } }, "mappings": [], "thresholds": { @@ -453,13 +508,18 @@ "displayMode": "list", "placement": "bottom", "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -477,7 +537,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -491,6 +551,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -559,11 +620,12 @@ "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "query_semaphore_wait_ms{namespace=\"${namespace}\"}", @@ -579,7 +641,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -593,6 +655,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -633,7 +696,32 @@ ] } }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "primary" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] }, "gridPos": { "h": 6, @@ -654,11 +742,12 @@ "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "query_kill_rate{namespace=\"${namespace}\"}", @@ -674,7 +763,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -688,6 +777,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -756,11 +846,12 @@ "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "store_connection_wait_time_ms{namespace=\"${namespace}\"}", @@ -776,7 +867,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -790,6 +881,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -857,7 +949,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "query_effort_ms{namespace=\"${namespace}\"}", @@ -873,7 +965,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -887,6 +979,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -954,11 +1047,12 @@ "sort": "none" } }, + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "store_connection_checkout_count{namespace=\"${namespace}\"}", @@ -974,7 +1068,7 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -988,23 +1082,24 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", + "fillOpacity": 0, + "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, - "lineInterpolation": "stepAfter", + "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, - "showPoints": "never", - "spanNulls": true, + "showPoints": "auto", + "spanNulls": false, "stacking": { "group": "A", "mode": "none" @@ -1014,7 +1109,6 @@ } }, "mappings": [], - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -1027,137 +1121,200 @@ "value": 80 } ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 36 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(indexer_error{namespace=\"$namespace\"}[$__rate_interval])", + "instant": false, + "legendFormat": "{{pod}}/{{code}}", + "range": true, + "refId": "A" + } + ], + "title": "Indexer Error Rate (errors/s) by component for $namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, - "unit": "short" + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 50 + } + ] + } }, "overrides": [ { "matcher": { "id": "byName", - "options": "batch queries" + "options": "Deployment Hash" }, "properties": [ { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } + "id": "custom.width", + "value": 300 + }, + { + "id": "custom.filterable", + "value": true } ] }, { "matcher": { "id": "byName", - "options": "batch queries_failed" + "options": "# Queries" }, "properties": [ { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } + "id": "custom.width", + "value": 150 } ] }, { "matcher": { - "id": "byName", - "options": "queries_invalid" + "id": "byType", + "options": "number" }, "properties": [ { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } + "id": "unit", + "value": "locale" } ] } ] }, "gridPos": { - "h": 6, + "h": 8, "w": 12, - "x": 12, - "y": 36 + "x": 0, + "y": 42 }, - "id": 12, + "id": 19, "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last *", - "sortDesc": true + "cellHeight": "sm", + "footer": { + "countRows": true, + "enablePagination": true, + "fields": "", + "pageSize": 10, + "reducer": [], + "show": true }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "# Queries" + } + ] }, - "pluginVersion": "8.5.2", + "pluginVersion": "", "targets": [ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(rate(indexer_service_cost_model_queries_invalid{namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "topk(\n 10,\n sum by (deployment) (\n increase(indexer_query_handler_seconds_count{namespace=\"$namespace\"}[$__range])\n )\n)", + "format": "table", + "instant": true, "interval": "", - "legendFormat": "queries_invalid", - "range": true, + "intervalFactor": 1, + "legendFormat": "{{ deployment }}", "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "sum(rate(indexer_service_cost_model_batch_queries{namespace=\"$namespace\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "batch queries", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "sum(rate(indexer_service_cost_model_batch_queries_failed{namespace=\"$namespace\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "batch queries_failed", - "range": true, - "refId": "C" - }, + } + ], + "title": "Top 10 Deployments by Queries for $namespace", + "transformations": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "expr": "sum(rate(indexer_service_cost_model_batch_queries_invalid[1m]))", - "interval": "", - "legendFormat": "batch queries_invalid", - "refId": "D" + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "includeByName": {}, + "indexByName": {}, + "order": [ + { + "name": "Deployment Hash", + "type": "string" + }, + { + "name": "# Queries", + "type": "number" + } + ], + "renameByName": { + "Value": "# Queries", + "deployment": "Deployment Hash" + } + } } ], - "title": "Cost Model QPS for $namespace", - "type": "timeseries" + "type": "table" }, { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -1261,10 +1418,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 42 + "x": 12, + "y": 44 }, - "id": 19, + "id": 20, "options": { "cellHeight": "sm", "footer": { @@ -1289,10 +1446,10 @@ { "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sort_desc(sum by (deployment) (indexer_service_queries_total{namespace=\"$namespace\"}))", + "expr": "sort_desc(\n sum by (deployment) (\n increase(indexer_query_handler_seconds_count{namespace=\"$namespace\"}[$__range])\n )\n)", "format": "table", "instant": true, "interval": "", @@ -1319,139 +1476,31 @@ } ], "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "rate(indexer_error{namespace=\"$namespace\"}[$__rate_interval])", - "instant": false, - "legendFormat": "{{pod}}/{{code}}", - "range": true, - "refId": "A" - } - ], - "title": "Indexer Error Rate (errors/s) by component for $namespace", - "type": "timeseries" } ], "refresh": "", - "schemaVersion": 39, + "schemaVersion": 40, "tags": [], "templating": { "list": [ { - "current": { - "selected": false, - "text": "graph-arbitrum-one", - "value": "graph-arbitrum-one" - }, + "current": {}, "datasource": { "type": "prometheus", - "uid": "prometheus" + "uid": "${DS_PROMETHEUS}" }, - "definition": "label_values(indexer_service_channel_messages_total,namespace)", - "hide": 0, + "definition": "label_values(query_result_size_bucket,namespace)", "includeAll": false, "label": "Namespace", - "multi": false, "name": "namespace", "options": [], "query": { "qryType": 1, - "query": "label_values(indexer_service_channel_messages_total,namespace)", + "query": "label_values(query_result_size_bucket,namespace)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", - "skipUrlSync": false, - "sort": 0, "type": "query" } ] @@ -1478,4 +1527,4 @@ "uid": "graph-query-performance-overview", "version": 1, "weekStart": "" -} +} \ No newline at end of file