From 10ae47110aa4bd9822fd7bcd1bd614c0f7901600 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 31 Mar 2026 13:54:04 -0300 Subject: [PATCH] monitoring: combine Ariadne and Metis tests --- scripts/dashboards_render_atlas.py | 31 ++++++++++--------- .../monitoring/dashboards/atlas-jobs.json | 8 ++--- .../monitoring/dashboards/atlas-overview.json | 8 ++--- .../monitoring/grafana-dashboard-jobs.yaml | 8 ++--- .../grafana-dashboard-overview.yaml | 8 ++--- 5 files changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index 5db798d7..2c710135 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -419,16 +419,17 @@ ARIADNE_SCHEDULE_LAST_ERROR_RANGE_HOURS = ( "(time() - max_over_time(ariadne_schedule_last_error_timestamp_seconds[$__range])) / 3600" ) ARIADNE_ACCESS_REQUESTS = "ariadne_access_requests_total" -ARIADNE_CI_COVERAGE = 'ariadne_ci_coverage_percent{repo="ariadne"}' -ARIADNE_CI_TESTS = 'ariadne_ci_tests_total{repo="ariadne"}' -ARIADNE_TEST_SUCCESS_RATE = ( +TEST_REPO_SELECTOR = 'repo=~"ariadne|metis"' +TEST_CI_COVERAGE = f'ariadne_ci_coverage_percent{{{TEST_REPO_SELECTOR}}}' +TEST_CI_TESTS = f'ariadne_ci_tests_total{{{TEST_REPO_SELECTOR}}}' +TEST_SUCCESS_RATE = ( "100 * " - 'sum(max_over_time(ariadne_ci_tests_total{repo="ariadne",result="passed"}[30d])) ' + f'sum(max_over_time(ariadne_ci_tests_total{{{TEST_REPO_SELECTOR},result="passed"}}[30d])) ' "/ clamp_min(" - 'sum(max_over_time(ariadne_ci_tests_total{repo="ariadne",result=~"passed|failed|error"}[30d])), 1)' + f'sum(max_over_time(ariadne_ci_tests_total{{{TEST_REPO_SELECTOR},result=~"passed|failed|error"}}[30d])), 1)' ) -ARIADNE_TEST_FAILURES_24H = ( - 'sum by (result) (max_over_time(ariadne_ci_tests_total{repo="ariadne",result=~"failed|error"}[24h]))' +TEST_FAILURES_24H = ( + f'sum by (result) (max_over_time(ariadne_ci_tests_total{{{TEST_REPO_SELECTOR},result=~"failed|error"}}[24h]))' ) POSTGRES_CONN_USED = ( 'label_replace(sum(pg_stat_activity_count), "conn", "used", "__name__", ".*") ' @@ -1293,8 +1294,8 @@ def build_overview(): panels.append( timeseries_panel( 42, - "Ariadne Test Success Rate", - ARIADNE_TEST_SUCCESS_RATE, + "Ariadne + Metis Test Success Rate", + TEST_SUCCESS_RATE, {"h": 6, "w": 6, "x": 12, "y": 14}, unit="percent", max_value=100, @@ -1305,8 +1306,8 @@ def build_overview(): panels.append( bargauge_panel( 43, - "Tests with Failures (24h)", - ARIADNE_TEST_FAILURES_24H, + "Ariadne + Metis Tests with Failures (24h)", + TEST_FAILURES_24H, {"h": 6, "w": 6, "x": 18, "y": 14}, unit="none", instant=True, @@ -2652,8 +2653,8 @@ def build_jobs_dashboard(): panels.append( stat_panel( 17, - "Ariadne CI Coverage (%)", - ARIADNE_CI_COVERAGE, + "Ariadne + Metis CI Coverage (%)", + TEST_CI_COVERAGE, {"h": 6, "w": 4, "x": 8, "y": 11}, unit="percent", decimals=1, @@ -2664,8 +2665,8 @@ def build_jobs_dashboard(): panels.append( table_panel( 18, - "Ariadne CI Tests (latest)", - ARIADNE_CI_TESTS, + "Ariadne + Metis CI Tests (latest)", + TEST_CI_TESTS, {"h": 6, "w": 12, "x": 12, "y": 11}, unit="none", transformations=[{"id": "labelsToFields", "options": {}}, {"id": "sortBy", "options": {"fields": ["Value"], "order": "desc"}}], diff --git a/services/monitoring/dashboards/atlas-jobs.json b/services/monitoring/dashboards/atlas-jobs.json index 37b888d8..f4a59a0d 100644 --- a/services/monitoring/dashboards/atlas-jobs.json +++ b/services/monitoring/dashboards/atlas-jobs.json @@ -1125,7 +1125,7 @@ { "id": 17, "type": "stat", - "title": "Ariadne CI Coverage (%)", + "title": "Ariadne + Metis CI Coverage (%)", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1138,7 +1138,7 @@ }, "targets": [ { - "expr": "ariadne_ci_coverage_percent{repo=\"ariadne\"}", + "expr": "ariadne_ci_coverage_percent{repo=~\"ariadne|metis\"}", "refId": "A", "legendFormat": "{{branch}}", "instant": true @@ -1188,7 +1188,7 @@ { "id": 18, "type": "table", - "title": "Ariadne CI Tests (latest)", + "title": "Ariadne + Metis CI Tests (latest)", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1201,7 +1201,7 @@ }, "targets": [ { - "expr": "ariadne_ci_tests_total{repo=\"ariadne\"}", + "expr": "ariadne_ci_tests_total{repo=~\"ariadne|metis\"}", "refId": "A", "instant": true } diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index 1f8635bc..390cd3a2 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1677,7 +1677,7 @@ { "id": 42, "type": "timeseries", - "title": "Ariadne Test Success Rate", + "title": "Ariadne + Metis Test Success Rate", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1690,7 +1690,7 @@ }, "targets": [ { - "expr": "100 * sum(max_over_time(ariadne_ci_tests_total{repo=\"ariadne\",result=\"passed\"}[30d])) / clamp_min(sum(max_over_time(ariadne_ci_tests_total{repo=\"ariadne\",result=~\"passed|failed|error\"}[30d])), 1)", + "expr": "100 * sum(max_over_time(ariadne_ci_tests_total{repo=~\"ariadne|metis\",result=\"passed\"}[30d])) / clamp_min(sum(max_over_time(ariadne_ci_tests_total{repo=~\"ariadne|metis\",result=~\"passed|failed|error\"}[30d])), 1)", "refId": "A" } ], @@ -1714,7 +1714,7 @@ { "id": 43, "type": "bargauge", - "title": "Tests with Failures (24h)", + "title": "Ariadne + Metis Tests with Failures (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1727,7 +1727,7 @@ }, "targets": [ { - "expr": "sort_desc(sum by (result) (max_over_time(ariadne_ci_tests_total{repo=\"ariadne\",result=~\"failed|error\"}[24h])))", + "expr": "sort_desc(sum by (result) (max_over_time(ariadne_ci_tests_total{repo=~\"ariadne|metis\",result=~\"failed|error\"}[24h])))", "refId": "A", "legendFormat": "{{result}}", "instant": true diff --git a/services/monitoring/grafana-dashboard-jobs.yaml b/services/monitoring/grafana-dashboard-jobs.yaml index b16c9cbb..452921a8 100644 --- a/services/monitoring/grafana-dashboard-jobs.yaml +++ b/services/monitoring/grafana-dashboard-jobs.yaml @@ -1134,7 +1134,7 @@ data: { "id": 17, "type": "stat", - "title": "Ariadne CI Coverage (%)", + "title": "Ariadne + Metis CI Coverage (%)", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1147,7 +1147,7 @@ data: }, "targets": [ { - "expr": "ariadne_ci_coverage_percent{repo=\"ariadne\"}", + "expr": "ariadne_ci_coverage_percent{repo=~\"ariadne|metis\"}", "refId": "A", "legendFormat": "{{branch}}", "instant": true @@ -1197,7 +1197,7 @@ data: { "id": 18, "type": "table", - "title": "Ariadne CI Tests (latest)", + "title": "Ariadne + Metis CI Tests (latest)", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1210,7 +1210,7 @@ data: }, "targets": [ { - "expr": "ariadne_ci_tests_total{repo=\"ariadne\"}", + "expr": "ariadne_ci_tests_total{repo=~\"ariadne|metis\"}", "refId": "A", "instant": true } diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index fdfe1a70..bc08c3f9 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1686,7 +1686,7 @@ data: { "id": 42, "type": "timeseries", - "title": "Ariadne Test Success Rate", + "title": "Ariadne + Metis Test Success Rate", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1699,7 +1699,7 @@ data: }, "targets": [ { - "expr": "100 * sum(max_over_time(ariadne_ci_tests_total{repo=\"ariadne\",result=\"passed\"}[30d])) / clamp_min(sum(max_over_time(ariadne_ci_tests_total{repo=\"ariadne\",result=~\"passed|failed|error\"}[30d])), 1)", + "expr": "100 * sum(max_over_time(ariadne_ci_tests_total{repo=~\"ariadne|metis\",result=\"passed\"}[30d])) / clamp_min(sum(max_over_time(ariadne_ci_tests_total{repo=~\"ariadne|metis\",result=~\"passed|failed|error\"}[30d])), 1)", "refId": "A" } ], @@ -1723,7 +1723,7 @@ data: { "id": 43, "type": "bargauge", - "title": "Tests with Failures (24h)", + "title": "Ariadne + Metis Tests with Failures (24h)", "datasource": { "type": "prometheus", "uid": "atlas-vm" @@ -1736,7 +1736,7 @@ data: }, "targets": [ { - "expr": "sort_desc(sum by (result) (max_over_time(ariadne_ci_tests_total{repo=\"ariadne\",result=~\"failed|error\"}[24h])))", + "expr": "sort_desc(sum by (result) (max_over_time(ariadne_ci_tests_total{repo=~\"ariadne|metis\",result=~\"failed|error\"}[24h])))", "refId": "A", "legendFormat": "{{result}}", "instant": true