From d244bde9bda616d8ea87d0624636bb0192b6145f Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Mon, 23 Oct 2023 21:48:33 -0400 Subject: [PATCH 1/2] [opensearch] add dashboard panel (#1193) * add opensearch dashboard panel Signed-off-by: Pierre Tessier * add opensearch dashboard panel Signed-off-by: Pierre Tessier --------- Signed-off-by: Pierre Tessier --- CHANGELOG.md | 4 + .../dashboards/demo/demo-dashboard.json | 428 +++++++++++++----- 2 files changed, 319 insertions(+), 113 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f46ba16d09..21150d3316 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,10 @@ release. ([#1180](https://github.com/open-telemetry/opentelemetry-demo/pull/1180)) * [java-services] Update java, gradle and OTel agent versions ([#1183](https://github.com/open-telemetry/opentelemetry-demo/pull/1183)) +* [opensearch] Add OpenSearch as an OTLP Logging backend + ([#1151](https://github.com/open-telemetry/opentelemetry-demo/pull/1151)) +* [opensearch] Add Grafana dashboard panels for OpenSearch log data + ([#1193](https://github.com/open-telemetry/opentelemetry-demo/pull/1193)) ## 1.5.0 diff --git a/src/grafana/provisioning/dashboards/demo/demo-dashboard.json b/src/grafana/provisioning/dashboards/demo/demo-dashboard.json index 18c919bbc7..2315dea41a 100644 --- a/src/grafana/provisioning/dashboards/demo/demo-dashboard.json +++ b/src/grafana/provisioning/dashboards/demo/demo-dashboard.json @@ -37,7 +37,7 @@ }, "id": 14, "panels": [], - "title": "Metrics", + "title": "Spanmetrics", "type": "row" }, { @@ -45,6 +45,7 @@ "type": "prometheus", "uid": "webstore-metrics" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -95,7 +96,7 @@ } ] }, - "unit": "percent" + "unit": "dtdurationms" }, "overrides": [] }, @@ -105,7 +106,7 @@ "x": 0, "y": 1 }, - "id": 6, + "id": 2, "options": { "legend": { "calcs": [], @@ -125,10 +126,9 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "rate(process_runtime_cpython_cpu_time_seconds_total{type=~\"system\"}[$__rate_interval])*100", - "hide": false, - "interval": "2m", - "legendFormat": "{{job}} ({{type}})", + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "legendFormat": "quantile50", "range": true, "refId": "A" }, @@ -138,24 +138,41 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "rate(process_runtime_cpython_cpu_time_seconds_total{type=~\"user\"}[$__rate_interval])*100", + "exemplar": false, + "expr": "histogram_quantile(0.95, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", "hide": false, - "interval": "2m", - "legendFormat": "{{job}} ({{type}})", + "legendFormat": "quantile95", "range": true, "refId": "B" - } - ], - "title": "Python services (CPU%)", - "transformations": [ + }, { - "id": "renameByRegex", - "options": { - "regex": "opentelemetry-demo/(.*)", - "renamePattern": "$1" - } + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.99, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "hide": false, + "legendFormat": "quantile99", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "exemplar": false, + "expr": "histogram_quantile(0.999, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", + "hide": false, + "legendFormat": "quantile999", + "range": true, + "refId": "D" } ], + "title": "Latency for ${service}", "type": "timeseries" }, { @@ -163,6 +180,7 @@ "type": "prometheus", "uid": "webstore-metrics" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -212,8 +230,7 @@ "value": 80 } ] - }, - "unit": "bytes" + } }, "overrides": [] }, @@ -223,7 +240,7 @@ "x": 12, "y": 1 }, - "id": 8, + "id": 10, "options": { "legend": { "calcs": [], @@ -243,22 +260,14 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "process_runtime_cpython_memory_bytes{type=\"rss\"}", - "legendFormat": "{{job}}", + "expr": " sum by (span_name) (rate(calls_total{status_code=\"STATUS_CODE_ERROR\", service_name=\"${service}\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "{{ span_name }}", "range": true, "refId": "A" } ], - "title": "Python services (Memory)", - "transformations": [ - { - "id": "renameByRegex", - "options": { - "regex": "opentelemetry-demo/(.*)", - "renamePattern": "$1" - } - } - ], + "title": "Error Rate for ${service} by span name", "type": "timeseries" }, { @@ -277,7 +286,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "drawStyle": "bars", + "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { @@ -315,7 +324,8 @@ "value": 80 } ] - } + }, + "unit": "reqps" }, "overrides": [] }, @@ -325,13 +335,13 @@ "x": 0, "y": 9 }, - "id": 4, + "id": 12, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", - "showLegend": false + "showLegend": true }, "tooltip": { "mode": "single", @@ -345,22 +355,222 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "rate(app_recommendations_counter_total{recommendation_type=\"catalog\"}[$__rate_interval])", - "interval": "2m", - "legendFormat": "recommendations", + "expr": "sum by (span_name) (rate(duration_milliseconds_count{service_name=\"${service}\"}[$__rate_interval]))", + "legendFormat": "{{ span_name }}", "range": true, "refId": "A" } ], - "title": "Recommendations Rate", + "title": "Requests Rate for ${service} by span name", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 19, + "panels": [], + "title": "Application Logs", + "type": "row" + }, + { + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "P9744FCCEAAFBD98F" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 0, + "y": 18 + }, + "id": 20, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.1.2", + "targets": [ + { + "alias": "", + "bucketAggs": [ + { + "field": "time", + "id": "2", + "settings": { + "interval": "auto" + }, + "type": "date_histogram" + } + ], + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "P9744FCCEAAFBD98F" + }, + "format": "table", + "metrics": [ + { + "id": "1", + "type": "count" + } + ], + "query": "search source=otel\n| where serviceName=\"${service}\"\n| stats count() by severityText", + "queryType": "PPL", + "refId": "A", + "timeField": "time" + } + ], + "title": "${service} Log entries by Severity", + "type": "table" + }, + { + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "P9744FCCEAAFBD98F" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 20, + "x": 4, + "y": 18 + }, + "id": 17, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.1.2", + "targets": [ + { + "alias": "", + "bucketAggs": [ + { + "field": "time", + "id": "2", + "settings": { + "interval": "auto" + }, + "type": "date_histogram" + } + ], + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "P9744FCCEAAFBD98F" + }, + "format": "logs", + "hide": false, + "metrics": [ + { + "id": "1", + "type": "count" + } + ], + "query": "search source=otel\n| where serviceName=\"${service}\"", + "queryType": "PPL", + "refId": "A", + "timeField": "time" + } + ], + "title": "${service} Logs", + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 18, + "panels": [], + "title": "Application Metrics", + "type": "row" + }, { "datasource": { "type": "prometheus", "uid": "webstore-metrics" }, - "description": "", "fieldConfig": { "defaults": { "color": { @@ -410,17 +620,18 @@ "value": 80 } ] - } + }, + "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 9 + "x": 0, + "y": 27 }, - "id": 10, + "id": 6, "options": { "legend": { "calcs": [], @@ -440,14 +651,37 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": " sum by (span_name) (rate(calls_total{status_code=\"STATUS_CODE_ERROR\", service_name=\"${service}\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "{{ span_name }}", + "expr": "rate(process_runtime_cpython_cpu_time_seconds_total{type=~\"system\"}[$__rate_interval])*100", + "hide": false, + "interval": "2m", + "legendFormat": "{{job}} ({{type}})", "range": true, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "webstore-metrics" + }, + "editorMode": "code", + "expr": "rate(process_runtime_cpython_cpu_time_seconds_total{type=~\"user\"}[$__rate_interval])*100", + "hide": false, + "interval": "2m", + "legendFormat": "{{job}} ({{type}})", + "range": true, + "refId": "B" + } + ], + "title": "Python services (CPU%)", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "opentelemetry-demo/(.*)", + "renamePattern": "$1" + } } ], - "title": "Error Rate for ${service} by span name", "type": "timeseries" }, { @@ -455,7 +689,6 @@ "type": "prometheus", "uid": "webstore-metrics" }, - "description": "", "fieldConfig": { "defaults": { "color": { @@ -506,17 +739,17 @@ } ] }, - "unit": "dtdurationms" + "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 17 + "x": 12, + "y": 27 }, - "id": 2, + "id": 8, "options": { "legend": { "calcs": [], @@ -536,53 +769,22 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "exemplar": true, - "expr": "histogram_quantile(0.50, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", - "legendFormat": "quantile50", + "expr": "process_runtime_cpython_memory_bytes{type=\"rss\"}", + "legendFormat": "{{job}}", "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "webstore-metrics" - }, - "editorMode": "code", - "exemplar": false, - "expr": "histogram_quantile(0.95, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", - "hide": false, - "legendFormat": "quantile95", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "webstore-metrics" - }, - "editorMode": "code", - "exemplar": false, - "expr": "histogram_quantile(0.99, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", - "hide": false, - "legendFormat": "quantile99", - "range": true, - "refId": "C" - }, + } + ], + "title": "Python services (Memory)", + "transformations": [ { - "datasource": { - "type": "prometheus", - "uid": "webstore-metrics" - }, - "editorMode": "code", - "exemplar": false, - "expr": "histogram_quantile(0.999, sum(rate(duration_milliseconds_bucket{service_name=\"${service}\"}[$__rate_interval])) by (le))", - "hide": false, - "legendFormat": "quantile999", - "range": true, - "refId": "D" + "id": "renameByRegex", + "options": { + "regex": "opentelemetry-demo/(.*)", + "renamePattern": "$1" + } } ], - "title": "Latency for ${service}", "type": "timeseries" }, { @@ -601,7 +803,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "drawStyle": "line", + "drawStyle": "bars", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { @@ -639,24 +841,23 @@ "value": 80 } ] - }, - "unit": "reqps" + } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 17 + "x": 0, + "y": 35 }, - "id": 12, + "id": 4, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", - "showLegend": true + "showLegend": false }, "tooltip": { "mode": "single", @@ -670,13 +871,14 @@ "uid": "webstore-metrics" }, "editorMode": "code", - "expr": "sum by (span_name) (rate(duration_milliseconds_count{service_name=\"${service}\"}[$__rate_interval]))", - "legendFormat": "{{ span_name }}", + "expr": "rate(app_recommendations_counter_total{recommendation_type=\"catalog\"}[$__rate_interval])", + "interval": "2m", + "legendFormat": "recommendations", "range": true, "refId": "A" } ], - "title": "Requests Rate for ${service} by span name", + "title": "Recommendations Rate", "type": "timeseries" }, { @@ -740,8 +942,8 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 25 + "x": 12, + "y": 35 }, "id": 16, "options": { @@ -784,9 +986,9 @@ { "allValue": "", "current": { - "selected": false, - "text": "frontend", - "value": "frontend" + "selected": true, + "text": "adservice", + "value": "adservice" }, "datasource": { "type": "prometheus", From 3a00b4966f4fe4d0c6786f17f56368ba7882041b Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Tue, 24 Oct 2023 12:40:55 -0700 Subject: [PATCH 2/2] Update README.md (#1194) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b269149c4d..e3b338c414 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Monday at 8:30 AM PST and anyone is welcome. [Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer) ([@open-telemetry/demo-maintainers](https://github.com/orgs/open-telemetry/teams/demo-maintainers)): -- [Austin Parker](https://github.com/austinlparker), Lightstep +- [Austin Parker](https://github.com/austinlparker), Honeycomb - [Carter Socha](https://github.com/cartersocha), Lightstep - [Juliano Costa](https://github.com/julianocosta89), Dynatrace - [Pierre Tessier](https://github.com/puckpuck), Honeycomb