From 9a1b07a366318c742efc828ae1d2cf8fa95dbdea Mon Sep 17 00:00:00 2001 From: Ziqi Zhao Date: Wed, 3 May 2023 21:21:53 +0800 Subject: [PATCH] [grafana] fix demo dashboard to be compatible with spanmetrics connector (#874) * [grafana] fix demo dashboard to be compatible with spanmetrics connector Signed-off-by: Ziqi Zhao * add changelog entry Signed-off-by: Ziqi Zhao * fix some naming Signed-off-by: Ziqi Zhao --------- Signed-off-by: Ziqi Zhao --- CHANGELOG.md | 2 ++ .../dashboards/general/demo-dashboard.json | 32 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5bae6e062..dedcdf1b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ release. ([#865](https://github.com/open-telemetry/opentelemetry-demo/pull/865)) * [load generator] Bump loagen dependencies ([#869](https://github.com/open-telemetry/opentelemetry-demo/pull/869)) +* [grafana] fix demo dashboard to be compatible with spanmetrics connector + ([#874](https://github.com/open-telemetry/opentelemetry-demo/pull/874)) ## 1.4.0 diff --git a/src/grafana/provisioning/dashboards/general/demo-dashboard.json b/src/grafana/provisioning/dashboards/general/demo-dashboard.json index 37061e1bda..ba021e62aa 100644 --- a/src/grafana/provisioning/dashboards/general/demo-dashboard.json +++ b/src/grafana/provisioning/dashboards/general/demo-dashboard.json @@ -413,13 +413,13 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "rate(calls_total{status_code=\"STATUS_CODE_ERROR\"}[$__interval])", - "legendFormat": "__auto", + "expr": "rate(calls_total{status_code=\"STATUS_CODE_ERROR\", service_name=\"${service}\"}[$__interval])", + "legendFormat": "{{ span_name }}", "range": true, "refId": "A" } ], - "title": "Error Rate", + "title": "Error Rate by Service", "type": "timeseries" }, { @@ -507,8 +507,8 @@ }, "editorMode": "code", "exemplar": true, - "expr": "histogram_quantile(0.50, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", - "legendFormat": "__auto", + "expr": "histogram_quantile(0.50, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "legendFormat": "quantile50", "range": true, "refId": "A" }, @@ -519,9 +519,9 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.95, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "expr": "histogram_quantile(0.95, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", "hide": false, - "legendFormat": "__auto", + "legendFormat": "quantile95", "range": true, "refId": "B" }, @@ -532,9 +532,9 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.99, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "expr": "histogram_quantile(0.99, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", "hide": false, - "legendFormat": "__auto", + "legendFormat": "quantile99", "range": true, "refId": "C" }, @@ -545,14 +545,14 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.999, sum(rate(latency_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "expr": "histogram_quantile(0.999, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", "hide": false, - "legendFormat": "__auto", + "legendFormat": "quantile999", "range": true, "refId": "D" } ], - "title": "Service Latency (from SpanMetrics)", + "title": "Service Latency by Service (from SpanMetrics)", "type": "timeseries" }, { @@ -639,8 +639,8 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "rate(latency_count{service_name=\"${service}\"}[$__rate_interval])", - "legendFormat": "__auto", + "expr": "rate(duration_milliseconds_count{service_name=\"${service}\"}[$__rate_interval])", + "legendFormat": "{{ span_name }}", "range": true, "refId": "A" } @@ -665,14 +665,14 @@ "type": "prometheus", "uid": "webstore-metrics" }, - "definition": "latency_bucket", + "definition": "duration_milliseconds_bucket", "hide": 0, "includeAll": false, "multi": false, "name": "service", "options": [], "query": { - "query": "latency_bucket", + "query": "duration_milliseconds_bucket", "refId": "StandardVariableQuery" }, "refresh": 1,