From 6240c0b9a521b78a043d63a0ba33025e05ae789b Mon Sep 17 00:00:00 2001
From: Pavol Loffay
Date: Fri, 1 Nov 2024 11:52:05 +0100
Subject: [PATCH 1/4] Add perses to monitor example
Signed-off-by: Pavol Loffay
---
docker-compose/monitor/docker-compose.yml | 11 +++
.../monitor/perses/dashboards/monitor.json | 67 +++++++++++++++++++
.../perses/globaldatasources/prometheus.json | 54 +++++++++++++++
docker-compose/monitor/perses/perses.yaml | 32 +++++++++
.../monitor/perses/projects/jaeger.json | 14 ++++
5 files changed, 178 insertions(+)
create mode 100644 docker-compose/monitor/perses/dashboards/monitor.json
create mode 100644 docker-compose/monitor/perses/globaldatasources/prometheus.json
create mode 100644 docker-compose/monitor/perses/perses.yaml
create mode 100644 docker-compose/monitor/perses/projects/jaeger.json
diff --git a/docker-compose/monitor/docker-compose.yml b/docker-compose/monitor/docker-compose.yml
index 983e3c2e68b..70eb1a442b3 100644
--- a/docker-compose/monitor/docker-compose.yml
+++ b/docker-compose/monitor/docker-compose.yml
@@ -64,5 +64,16 @@ services:
ports:
- "3000:3000"
+ perses:
+ networks:
+ - backend
+ image: persesdev/perses:v0.49
+ command: "--config=/etc/perses.yaml"
+ volumes:
+ - ./perses:/etc/perses/provisioning
+ - ./perses/perses.yaml:/etc/perses.yaml
+ ports:
+ - "8080:8080"
+
networks:
backend:
diff --git a/docker-compose/monitor/perses/dashboards/monitor.json b/docker-compose/monitor/perses/dashboards/monitor.json
new file mode 100644
index 00000000000..52af8a949c5
--- /dev/null
+++ b/docker-compose/monitor/perses/dashboards/monitor.json
@@ -0,0 +1,67 @@
+{
+ "kind": "Dashboard",
+ "metadata": {
+ "name": "monitor",
+ "createdAt": "2024-11-01T10:33:05.237682703Z",
+ "updatedAt": "2024-11-01T10:33:05.237682703Z",
+ "version": 0,
+ "project": "jaeger"
+ },
+ "spec": {
+ "display": {
+ "name": "monitor"
+ },
+ "panels": {
+ "calls": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "calls"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {}
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "query": "traces_span_metrics_calls_total"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ "layouts": [
+ {
+ "kind": "Grid",
+ "spec": {
+ "display": {
+ "title": "Panel Group",
+ "collapse": {
+ "open": true
+ }
+ },
+ "items": [
+ {
+ "x": 0,
+ "y": 0,
+ "width": 12,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/calls"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "duration": "1h"
+ }
+}
\ No newline at end of file
diff --git a/docker-compose/monitor/perses/globaldatasources/prometheus.json b/docker-compose/monitor/perses/globaldatasources/prometheus.json
new file mode 100644
index 00000000000..6ca5511a126
--- /dev/null
+++ b/docker-compose/monitor/perses/globaldatasources/prometheus.json
@@ -0,0 +1,54 @@
+# percli describe gdts prometheus -o json | jq
+{
+ "kind": "GlobalDatasource",
+ "metadata": {
+ "name": "prometheus",
+ "createdAt": "2024-11-01T10:31:22.358795716Z",
+ "updatedAt": "2024-11-01T10:31:22.358795716Z",
+ "version": 0
+ },
+ "spec": {
+ "default": true,
+ "plugin": {
+ "kind": "PrometheusDatasource",
+ "spec": {
+ "proxy": {
+ "kind": "HTTPProxy",
+ "spec": {
+ "allowedEndpoints": [
+ {
+ "endpointPattern": "/api/v1/labels",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/series",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/metadata",
+ "method": "GET"
+ },
+ {
+ "endpointPattern": "/api/v1/query",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/query_range",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/label/([a-zA-Z0-9_-]+)/values",
+ "method": "GET"
+ },
+ {
+ "endpointPattern": "/api/v1/parse_query",
+ "method": "POST"
+ }
+ ],
+ "url": "http://prometheus:9090"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/docker-compose/monitor/perses/perses.yaml b/docker-compose/monitor/perses/perses.yaml
new file mode 100644
index 00000000000..1c19731347f
--- /dev/null
+++ b/docker-compose/monitor/perses/perses.yaml
@@ -0,0 +1,32 @@
+database:
+ file:
+ extension: "json"
+ folder: "/perses"
+ case_sensitive: false
+schemas:
+ panels_path: "/etc/perses/cue/schemas/panels"
+ queries_path: "/etc/perses/cue/schemas/queries"
+ datasources_path: "/etc/perses/cue/schemas/datasources"
+ variables_path: "/etc/perses/cue/schemas/variables"
+ interval: "5m"
+
+
+provisioning:
+ interval: "12h"
+ folders:
+ - "/etc/perses/provisioning"
+
+frontend:
+ explorer:
+ enable: true
+
+ important_dashboards:
+ - project: "perses"
+ dashboard: "NodeExporterFull"
+
+ information: |-
+ # Welcome to the Demo instance of Perses!
+
+ This public demo instance is here to show you what Perses looks like
+ and what's possible to do with it. You can have a look at the example
+ dashboards, or create your own ones!
\ No newline at end of file
diff --git a/docker-compose/monitor/perses/projects/jaeger.json b/docker-compose/monitor/perses/projects/jaeger.json
new file mode 100644
index 00000000000..e72aa563d21
--- /dev/null
+++ b/docker-compose/monitor/perses/projects/jaeger.json
@@ -0,0 +1,14 @@
+{
+ "kind": "Project",
+ "metadata": {
+ "name": "jaeger",
+ "createdAt": "2024-11-01T10:25:06.797226244Z",
+ "updatedAt": "2024-11-01T10:25:06.797226244Z",
+ "version": 0
+ },
+ "spec": {
+ "display": {
+ "name": "jaeger"
+ }
+ }
+}
\ No newline at end of file
From b3a331692da124efb1159fa502fa970409019b67 Mon Sep 17 00:00:00 2001
From: Pavol Loffay
Date: Fri, 1 Nov 2024 11:53:07 +0100
Subject: [PATCH 2/4] Add perses to monitor example
Signed-off-by: Pavol Loffay
---
docker-compose/monitor/perses/perses.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docker-compose/monitor/perses/perses.yaml b/docker-compose/monitor/perses/perses.yaml
index 1c19731347f..3e35515e048 100644
--- a/docker-compose/monitor/perses/perses.yaml
+++ b/docker-compose/monitor/perses/perses.yaml
@@ -21,8 +21,8 @@ frontend:
enable: true
important_dashboards:
- - project: "perses"
- dashboard: "NodeExporterFull"
+ - project: "jaeger"
+ dashboard: "monitor"
information: |-
# Welcome to the Demo instance of Perses!
From a819d25454af28cbbc184f7010840bd9943ad4d5 Mon Sep 17 00:00:00 2001
From: Pavol Loffay
Date: Fri, 1 Nov 2024 12:01:35 +0100
Subject: [PATCH 3/4] Add perses to monitor example
Signed-off-by: Pavol Loffay
---
docker-compose/monitor/perses/globaldatasources/prometheus.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/docker-compose/monitor/perses/globaldatasources/prometheus.json b/docker-compose/monitor/perses/globaldatasources/prometheus.json
index 6ca5511a126..1fcd38fdcf2 100644
--- a/docker-compose/monitor/perses/globaldatasources/prometheus.json
+++ b/docker-compose/monitor/perses/globaldatasources/prometheus.json
@@ -1,4 +1,3 @@
-# percli describe gdts prometheus -o json | jq
{
"kind": "GlobalDatasource",
"metadata": {
From 169215b0ab44980f1a435e84742cdb186ab3ec1a Mon Sep 17 00:00:00 2001
From: Pavol Loffay
Date: Wed, 13 Nov 2024 13:12:02 -0700
Subject: [PATCH 4/4] Add dashboards
Signed-off-by: Pavol Loffay
---
docker-compose/monitor/docker-compose.yml | 2 +-
.../monitor/perses/dashboards/monitor.json | 67 --
.../perses/dashboards/spm-service.yaml | 609 +++++++++++++++++
.../monitor/perses/dashboards/spm.yaml | 620 ++++++++++++++++++
docker-compose/monitor/perses/perses.yaml | 2 +-
5 files changed, 1231 insertions(+), 69 deletions(-)
delete mode 100644 docker-compose/monitor/perses/dashboards/monitor.json
create mode 100644 docker-compose/monitor/perses/dashboards/spm-service.yaml
create mode 100644 docker-compose/monitor/perses/dashboards/spm.yaml
diff --git a/docker-compose/monitor/docker-compose.yml b/docker-compose/monitor/docker-compose.yml
index 70eb1a442b3..92717e7e926 100644
--- a/docker-compose/monitor/docker-compose.yml
+++ b/docker-compose/monitor/docker-compose.yml
@@ -73,7 +73,7 @@ services:
- ./perses:/etc/perses/provisioning
- ./perses/perses.yaml:/etc/perses.yaml
ports:
- - "8080:8080"
+ - "8085:8080"
networks:
backend:
diff --git a/docker-compose/monitor/perses/dashboards/monitor.json b/docker-compose/monitor/perses/dashboards/monitor.json
deleted file mode 100644
index 52af8a949c5..00000000000
--- a/docker-compose/monitor/perses/dashboards/monitor.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "kind": "Dashboard",
- "metadata": {
- "name": "monitor",
- "createdAt": "2024-11-01T10:33:05.237682703Z",
- "updatedAt": "2024-11-01T10:33:05.237682703Z",
- "version": 0,
- "project": "jaeger"
- },
- "spec": {
- "display": {
- "name": "monitor"
- },
- "panels": {
- "calls": {
- "kind": "Panel",
- "spec": {
- "display": {
- "name": "calls"
- },
- "plugin": {
- "kind": "TimeSeriesChart",
- "spec": {}
- },
- "queries": [
- {
- "kind": "TimeSeriesQuery",
- "spec": {
- "plugin": {
- "kind": "PrometheusTimeSeriesQuery",
- "spec": {
- "query": "traces_span_metrics_calls_total"
- }
- }
- }
- }
- ]
- }
- }
- },
- "layouts": [
- {
- "kind": "Grid",
- "spec": {
- "display": {
- "title": "Panel Group",
- "collapse": {
- "open": true
- }
- },
- "items": [
- {
- "x": 0,
- "y": 0,
- "width": 12,
- "height": 6,
- "content": {
- "$ref": "#/spec/panels/calls"
- }
- }
- ]
- }
- }
- ],
- "duration": "1h"
- }
-}
\ No newline at end of file
diff --git a/docker-compose/monitor/perses/dashboards/spm-service.yaml b/docker-compose/monitor/perses/dashboards/spm-service.yaml
new file mode 100644
index 00000000000..47e768cbac0
--- /dev/null
+++ b/docker-compose/monitor/perses/dashboards/spm-service.yaml
@@ -0,0 +1,609 @@
+{
+ "kind": "Dashboard",
+ "metadata": {
+ "name": "spm-service",
+ "createdAt": "2024-11-13T18:36:47.119791514Z",
+ "updatedAt": "2024-11-13T18:56:40.598971619Z",
+ "version": 6,
+ "project": "jaeger"
+ },
+ "spec": {
+ "display": {
+ "name": "SPM Dashboard - Service level"
+ },
+ "datasources": {
+ "NewDatasource": {
+ "default": false,
+ "plugin": {
+ "kind": "PrometheusDatasource",
+ "spec": {
+ "proxy": {
+ "kind": "HTTPProxy",
+ "spec": {
+ "allowedEndpoints": [
+ {
+ "endpointPattern": "/api/v1/labels",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/series",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/metadata",
+ "method": "GET"
+ },
+ {
+ "endpointPattern": "/api/v1/query",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/query_range",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/label/([a-zA-Z0-9_-]+)/values",
+ "method": "GET"
+ },
+ {
+ "endpointPattern": "/api/v1/parse_query",
+ "method": "POST"
+ }
+ ],
+ "url": "http://prometheus:9090"
+ }
+ }
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "kind": "ListVariable",
+ "spec": {
+ "display": {
+ "name": "Service",
+ "hidden": false
+ },
+ "defaultValue": "frontend",
+ "allowAllValue": false,
+ "allowMultiple": false,
+ "sort": "none",
+ "plugin": {
+ "kind": "PrometheusLabelValuesVariable",
+ "spec": {
+ "datasource": {
+ "kind": "PrometheusDatasource",
+ "name": "prometheus"
+ },
+ "labelName": "service_name",
+ "matchers": [
+ "traces_span_metrics_calls_total"
+ ]
+ }
+ },
+ "name": "service"
+ }
+ },
+ {
+ "kind": "ListVariable",
+ "spec": {
+ "defaultValue": [
+ "/dispatch"
+ ],
+ "allowAllValue": false,
+ "allowMultiple": true,
+ "sort": "none",
+ "plugin": {
+ "kind": "PrometheusLabelValuesVariable",
+ "spec": {
+ "datasource": {
+ "kind": "PrometheusDatasource",
+ "name": "prometheus"
+ },
+ "labelName": "span_name",
+ "matchers": [
+ "traces_span_metrics_calls_total{service_name=\"$service\"}"
+ ]
+ }
+ },
+ "name": "operation"
+ }
+ }
+ ],
+ "panels": {
+ "0_0": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Total # of spans"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "sum",
+ "thresholds": {
+ "steps": [
+ {
+ "color": "semi-dark-blue",
+ "value": 0
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_1": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Latency per Service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "milliseconds"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "histogram_quantile(0.95, sum(rate(traces_span_metrics_duration_milliseconds_bucket{service_name=~\"$service\"}[$__rate_interval])) by (service_name,le))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_2": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Spans per service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {}
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (service_name) (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_3": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Avg Error Rate"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "mean",
+ "format": {
+ "unit": "percent-decimal"
+ },
+ "thresholds": {
+ "steps": [
+ {
+ "color": "green",
+ "value": 0
+ },
+ {
+ "color": "red",
+ "value": 0.2
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(traces_span_metrics_calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\"}[$__rate_interval])) / sum (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_4": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Stats"
+ },
+ "plugin": {
+ "kind": "Table",
+ "spec": {
+ "columnSettings": []
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (operation)(rate(traces_span_metrics_calls_total{service_name=\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ },
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\"}[5m])) by (operation,le))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ },
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (operation)(rate(calls_total{service_name=~\"$service\",status_code=\"STATUS_CODE_ERROR\"}[$__rate_interval]))/sum by (operation)(rate(calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_0": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Total # of spans"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "sum",
+ "thresholds": {
+ "steps": [
+ {
+ "color": "semi-dark-blue",
+ "value": 0
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(calls_total{service_name=~\"$service\",operation=~\"$operation\"}[1m]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_1": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Latency per Operation"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "milliseconds"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\",operation=~\"$operation\"}[$__rate_interval])) by (operation,le))",
+ "seriesNameFormat": "{{operation}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_2": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Spans per service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {}
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (operation) (rate(calls_total{service_name=~\"$service\",operation=~\"$operation\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{operation}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_3": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Error Rate per Operation"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "percent-decimal"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (operation) (rate(calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\",operation=~\"$operation\"}[$__rate_interval])) / sum by (operation) (rate(calls_total{service_name=~\"$service\",operation=~\"$operation\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{operation}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_4": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Avg Error Rate"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "mean",
+ "format": {
+ "unit": "percent-decimal"
+ },
+ "thresholds": {
+ "steps": [
+ {
+ "color": "red",
+ "value": 0.2
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\",operation=~\"$operation\"}[$__rate_interval])) / sum (rate(calls_total{service_name=~\"$service\",operation=~\"$operation\"}[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ "layouts": [
+ {
+ "kind": "Grid",
+ "spec": {
+ "display": {
+ "title": "General information",
+ "collapse": {
+ "open": true
+ }
+ },
+ "items": [
+ {
+ "x": 0,
+ "y": 0,
+ "width": 3,
+ "height": 4,
+ "content": {
+ "$ref": "#/spec/panels/0_0"
+ }
+ },
+ {
+ "x": 3,
+ "y": 0,
+ "width": 10,
+ "height": 8,
+ "content": {
+ "$ref": "#/spec/panels/0_1"
+ }
+ },
+ {
+ "x": 13,
+ "y": 0,
+ "width": 11,
+ "height": 8,
+ "content": {
+ "$ref": "#/spec/panels/0_2"
+ }
+ },
+ {
+ "x": 0,
+ "y": 4,
+ "width": 3,
+ "height": 4,
+ "content": {
+ "$ref": "#/spec/panels/0_3"
+ }
+ },
+ {
+ "x": 0,
+ "y": 8,
+ "width": 24,
+ "height": 7,
+ "content": {
+ "$ref": "#/spec/panels/0_4"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "kind": "Grid",
+ "spec": {
+ "display": {
+ "title": "$operation - Stats per Service",
+ "collapse": {
+ "open": true
+ }
+ },
+ "items": [
+ {
+ "x": 0,
+ "y": 0,
+ "width": 2,
+ "height": 3,
+ "content": {
+ "$ref": "#/spec/panels/1_0"
+ }
+ },
+ {
+ "x": 2,
+ "y": 0,
+ "width": 8,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/1_1"
+ }
+ },
+ {
+ "x": 10,
+ "y": 0,
+ "width": 8,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/1_2"
+ }
+ },
+ {
+ "x": 18,
+ "y": 0,
+ "width": 6,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/1_3"
+ }
+ },
+ {
+ "x": 0,
+ "y": 3,
+ "width": 2,
+ "height": 3,
+ "content": {
+ "$ref": "#/spec/panels/1_4"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "duration": "1h"
+ }
+}
diff --git a/docker-compose/monitor/perses/dashboards/spm.yaml b/docker-compose/monitor/perses/dashboards/spm.yaml
new file mode 100644
index 00000000000..e89e459a591
--- /dev/null
+++ b/docker-compose/monitor/perses/dashboards/spm.yaml
@@ -0,0 +1,620 @@
+{
+ "kind": "Dashboard",
+ "metadata": {
+ "name": "spm",
+ "createdAt": "2024-11-13T18:40:17.312950785Z",
+ "updatedAt": "2024-11-13T18:48:54.863814983Z",
+ "version": 2,
+ "project": "jaeger"
+ },
+ "spec": {
+ "display": {
+ "name": "SPM Dashboard"
+ },
+ "datasources": {
+ "NewDatasource": {
+ "default": true,
+ "plugin": {
+ "kind": "PrometheusDatasource",
+ "spec": {
+ "proxy": {
+ "kind": "HTTPProxy",
+ "spec": {
+ "allowedEndpoints": [
+ {
+ "endpointPattern": "/api/v1/labels",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/series",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/metadata",
+ "method": "GET"
+ },
+ {
+ "endpointPattern": "/api/v1/query",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/query_range",
+ "method": "POST"
+ },
+ {
+ "endpointPattern": "/api/v1/label/([a-zA-Z0-9_-]+)/values",
+ "method": "GET"
+ },
+ {
+ "endpointPattern": "/api/v1/parse_query",
+ "method": "POST"
+ }
+ ],
+ "url": "http://prometheus:9090"
+ }
+ }
+ }
+ }
+ }
+ },
+ "variables": [
+ {
+ "kind": "ListVariable",
+ "spec": {
+ "display": {
+ "name": "Service",
+ "hidden": false
+ },
+ "defaultValue": [
+ "frontend"
+ ],
+ "allowAllValue": true,
+ "allowMultiple": true,
+ "sort": "none",
+ "plugin": {
+ "kind": "PrometheusLabelValuesVariable",
+ "spec": {
+ "labelName": "service_name",
+ "matchers": [
+ "traces_span_metrics_calls_total"
+ ]
+ }
+ },
+ "name": "service"
+ }
+ }
+ ],
+ "panels": {
+ "0_0": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Total # of spans"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "sum",
+ "thresholds": {
+ "steps": [
+ {
+ "color": "semi-dark-blue",
+ "value": 0
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_1": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Spans per service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {}
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (service_name) (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_2": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Avg Error Rate"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "mean",
+ "format": {
+ "unit": "percent-decimal"
+ },
+ "thresholds": {
+ "steps": [
+ {
+ "color": "green",
+ "value": 0
+ },
+ {
+ "color": "red",
+ "value": 0.2
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(traces_span_metrics_calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\"}[$__rate_interval])) / sum (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_3": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Error Rate per Service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "percent-decimal"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (service_name) (rate(traces_span_metrics_calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\"}[$__rate_interval])) / sum by (service_name) (rate(traces_span_metrics_calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_4": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Latency per Service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "milliseconds"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "histogram_quantile(0.95, sum(rate(traces_span_metrics_duration_milliseconds_bucket{service_name=~\"$service\"}[$__rate_interval])) by (service_name,le))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "0_5": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Stats"
+ },
+ "plugin": {
+ "kind": "Table",
+ "spec": {
+ "columnSettings": []
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (service_name)(rate(calls_total[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ },
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "histogram_quantile(0.95, sum(rate(latency_bucket[5m])) by (service_name,le))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ },
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (service_name)(rate(calls_total{status_code=\"STATUS_CODE_ERROR\"}[$__rate_interval]))/sum by (service_name)(rate(calls_total[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_0": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Total # of spans"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "sum",
+ "thresholds": {
+ "steps": []
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{service_name}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_1": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Latency per Operation"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "milliseconds"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "histogram_quantile(0.95, sum(rate(latency_bucket{service_name=~\"$service\"}[$__rate_interval])) by (operation,le))",
+ "seriesNameFormat": "{{operation}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_2": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Spans per service"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {}
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (operation) (rate(calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{operation}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_3": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Error Rate per Operation"
+ },
+ "plugin": {
+ "kind": "TimeSeriesChart",
+ "spec": {
+ "visual": {},
+ "yAxis": {
+ "format": {
+ "unit": "percent-decimal"
+ }
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum by (operation) (rate(calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\"}[$__rate_interval])) / sum by (operation) (rate(calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": "{{operation}}"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "1_4": {
+ "kind": "Panel",
+ "spec": {
+ "display": {
+ "name": "Avg Error Rate"
+ },
+ "plugin": {
+ "kind": "StatChart",
+ "spec": {
+ "calculation": "mean",
+ "format": {
+ "unit": "percent-decimal"
+ },
+ "thresholds": {
+ "steps": [
+ {
+ "color": "red",
+ "value": 0.2
+ }
+ ]
+ }
+ }
+ },
+ "queries": [
+ {
+ "kind": "TimeSeriesQuery",
+ "spec": {
+ "plugin": {
+ "kind": "PrometheusTimeSeriesQuery",
+ "spec": {
+ "minStep": "",
+ "query": "sum (rate(calls_total{service_name=~\"$service\",status_code=~\"STATUS_CODE_ERROR\"}[$__rate_interval])) / sum (rate(calls_total{service_name=~\"$service\"}[$__rate_interval]))",
+ "seriesNameFormat": ""
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ "layouts": [
+ {
+ "kind": "Grid",
+ "spec": {
+ "display": {
+ "title": "General information",
+ "collapse": {
+ "open": true
+ }
+ },
+ "items": [
+ {
+ "x": 0,
+ "y": 0,
+ "width": 3,
+ "height": 4,
+ "content": {
+ "$ref": "#/spec/panels/0_0"
+ }
+ },
+ {
+ "x": 3,
+ "y": 0,
+ "width": 21,
+ "height": 8,
+ "content": {
+ "$ref": "#/spec/panels/0_1"
+ }
+ },
+ {
+ "x": 0,
+ "y": 4,
+ "width": 3,
+ "height": 4,
+ "content": {
+ "$ref": "#/spec/panels/0_2"
+ }
+ },
+ {
+ "x": 0,
+ "y": 8,
+ "width": 12,
+ "height": 8,
+ "content": {
+ "$ref": "#/spec/panels/0_3"
+ }
+ },
+ {
+ "x": 12,
+ "y": 8,
+ "width": 12,
+ "height": 8,
+ "content": {
+ "$ref": "#/spec/panels/0_4"
+ }
+ },
+ {
+ "x": 0,
+ "y": 16,
+ "width": 24,
+ "height": 7,
+ "content": {
+ "$ref": "#/spec/panels/0_5"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "kind": "Grid",
+ "spec": {
+ "display": {
+ "title": "$service - Stats per Service",
+ "collapse": {
+ "open": true
+ }
+ },
+ "items": [
+ {
+ "x": 0,
+ "y": 0,
+ "width": 2,
+ "height": 3,
+ "content": {
+ "$ref": "#/spec/panels/1_0"
+ }
+ },
+ {
+ "x": 2,
+ "y": 0,
+ "width": 8,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/1_1"
+ }
+ },
+ {
+ "x": 10,
+ "y": 0,
+ "width": 8,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/1_2"
+ }
+ },
+ {
+ "x": 18,
+ "y": 0,
+ "width": 6,
+ "height": 6,
+ "content": {
+ "$ref": "#/spec/panels/1_3"
+ }
+ },
+ {
+ "x": 0,
+ "y": 3,
+ "width": 2,
+ "height": 3,
+ "content": {
+ "$ref": "#/spec/panels/1_4"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "duration": "5m"
+ }
+}
diff --git a/docker-compose/monitor/perses/perses.yaml b/docker-compose/monitor/perses/perses.yaml
index 3e35515e048..55a37ebdae5 100644
--- a/docker-compose/monitor/perses/perses.yaml
+++ b/docker-compose/monitor/perses/perses.yaml
@@ -22,7 +22,7 @@ frontend:
important_dashboards:
- project: "jaeger"
- dashboard: "monitor"
+ dashboard: "spm"
information: |-
# Welcome to the Demo instance of Perses!