From cd063a61b06a7bc9c2cdc8a62f0d4f6d10592f26 Mon Sep 17 00:00:00 2001 From: Zack Date: Thu, 9 Apr 2026 19:30:24 +0100 Subject: [PATCH 1/3] fix: emit release count from webhook handler --- apps/version/src/version-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/version/src/version-service.ts b/apps/version/src/version-service.ts index f2d1e36..ef29501 100644 --- a/apps/version/src/version-service.ts +++ b/apps/version/src/version-service.ts @@ -77,6 +77,7 @@ export class VersionService { this.metrics.push(Metric.create('webhook_release_upserted').addTag('tag', release.tag_name).intField('count', 1)); versionCache.invalidate(); await this.emitLatestVersion(); + await this.emitReleaseCount(); } async syncFromGitHub(githubRepository: IGitHubRepository): Promise<{ synced: number; full: boolean }> { From e2ac6dd52d5887df6503444bcb4502b7c204b4ce Mon Sep 17 00:00:00 2001 From: Zack Date: Mon, 13 Apr 2026 02:32:56 +0100 Subject: [PATCH 2/3] feat: add ipv4 vs ipv6 pie chart and set maxDataPoints to 300 --- .../dashboards/version-worker-overview.json | 199 +++++++++++++++--- 1 file changed, 165 insertions(+), 34 deletions(-) diff --git a/deployment/modules/cloudflare/workers/version/dashboards/version-worker-overview.json b/deployment/modules/cloudflare/workers/version/dashboards/version-worker-overview.json index d2f4d34..ebfb84d 100644 --- a/deployment/modules/cloudflare/workers/version/dashboards/version-worker-overview.json +++ b/deployment/modules/cloudflare/workers/version/dashboards/version-worker-overview.json @@ -81,7 +81,8 @@ } ], "title": "Unique Servers (24h)", - "type": "stat" + "type": "stat", + "maxDataPoints": 300 }, { "datasource": { @@ -142,7 +143,8 @@ } ], "title": "Total Requests (24h)", - "type": "stat" + "type": "stat", + "maxDataPoints": 300 }, { "datasource": { @@ -213,7 +215,8 @@ } ], "title": "Cache Hit Rate (24h)", - "type": "stat" + "type": "stat", + "maxDataPoints": 300 }, { "datasource": { @@ -285,7 +288,8 @@ } ], "title": "Servers Up-to-date (24h)", - "type": "stat" + "type": "stat", + "maxDataPoints": 300 }, { "datasource": { @@ -346,7 +350,8 @@ } ], "title": "Releases Stored", - "type": "stat" + "type": "stat", + "maxDataPoints": 300 }, { "datasource": { @@ -415,7 +420,8 @@ } ], "title": "Errors (24h)", - "type": "stat" + "type": "stat", + "maxDataPoints": 300 }, { "collapsed": false, @@ -545,7 +551,8 @@ } ], "title": "Unique Servers Over Time", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -610,7 +617,8 @@ } ], "title": "Version Distribution (24h)", - "type": "piechart" + "type": "piechart", + "maxDataPoints": 300 }, { "datasource": { @@ -707,7 +715,8 @@ } ], "title": "Version Adoption Over Time", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "title": "Latest Version: Upgrades vs New Installs", @@ -785,7 +794,8 @@ ] } ] - } + }, + "maxDataPoints": 300 }, { "datasource": { @@ -877,7 +887,8 @@ } ], "title": "New Servers (not seen in last 30d)", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "title": "New Server Rate", @@ -925,7 +936,8 @@ "unit": "short" }, "overrides": [] - } + }, + "maxDataPoints": 300 }, { "datasource": { @@ -951,7 +963,7 @@ }, "gridPos": { "h": 8, - "w": 8, + "w": 6, "x": 0, "y": 37 }, @@ -990,7 +1002,8 @@ } ], "title": "Servers by Continent (24h)", - "type": "piechart" + "type": "piechart", + "maxDataPoints": 300 }, { "datasource": { @@ -1047,8 +1060,8 @@ }, "gridPos": { "h": 8, - "w": 8, - "x": 8, + "w": 6, + "x": 6, "y": 37 }, "id": 13, @@ -1092,7 +1105,8 @@ } ], "title": "Traffic Source (24h)", - "type": "piechart" + "type": "piechart", + "maxDataPoints": 300 }, { "datasource": { @@ -1124,8 +1138,8 @@ }, "gridPos": { "h": 8, - "w": 8, - "x": 16, + "w": 6, + "x": 12, "y": 37 }, "id": 14, @@ -1158,7 +1172,111 @@ } ], "title": "Top Cloudflare Edge Locations (24h)", - "type": "bargauge" + "type": "bargauge", + "maxDataPoints": 300 + }, + { + "datasource": { + "type": "prometheus", + "uid": "36979063-5384-4eb9-8679-565a727cbc13" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "IPv4" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "IPv6" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 37 + }, + "id": 32, + "maxDataPoints": 300, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value", + "percent" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "expr": "count(count by (client_ip) (count_over_time(version_version_request_invocation{client_ip!~\".*:.*\",client_ip!=\"\"}[24h]) or count_over_time(version_changelog_request_invocation{client_ip!~\".*:.*\",client_ip!=\"\"}[24h])))", + "legendFormat": "IPv4", + "refId": "A", + "instant": true, + "range": false + }, + { + "expr": "count(count by (client_ip) (count_over_time(version_version_request_invocation{client_ip=~\".*:.*\"}[24h]) or count_over_time(version_changelog_request_invocation{client_ip=~\".*:.*\"}[24h])))", + "legendFormat": "IPv6", + "refId": "B", + "instant": true, + "range": false + } + ], + "title": "IPv4 vs IPv6 (24h)", + "type": "piechart" }, { "collapsed": false, @@ -1269,7 +1387,8 @@ } ], "title": "Request Duration (p95)", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -1460,7 +1579,8 @@ } ], "title": "Cache Hit Rate", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -1551,7 +1671,8 @@ } ], "title": "Requests by Region", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "collapsed": false, @@ -1679,7 +1800,8 @@ } ], "title": "D1 Query Duration (p95)", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -1787,7 +1909,8 @@ } ], "title": "D1 Query Rate", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -1894,7 +2017,8 @@ } ], "title": "D1 Error Rate", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -1985,7 +2109,8 @@ } ], "title": "Releases Stored Over Time", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "collapsed": false, @@ -2094,7 +2219,8 @@ } ], "title": "Webhook Events", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -2202,7 +2328,8 @@ } ], "title": "Cron Sync", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -2299,7 +2426,8 @@ } ], "title": "GitHub API Duration", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -2384,7 +2512,8 @@ } ], "title": "Data Source (Webhook vs Cron, 24h)", - "type": "piechart" + "type": "piechart", + "maxDataPoints": 300 }, { "collapsed": false, @@ -2487,7 +2616,8 @@ } ], "title": "Requests by Path (non-POST)", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 }, { "datasource": { @@ -2623,7 +2753,8 @@ } ], "title": "Response Status Codes", - "type": "timeseries" + "type": "timeseries", + "maxDataPoints": 300 } ], "refresh": "30s", @@ -2645,4 +2776,4 @@ "uid": "version-worker-overview", "version": 7, "weekStart": "" -} \ No newline at end of file +} From 8db729c986b5cbeff1df41c9bedc524c153a385a Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 22 Apr 2026 22:42:06 +0100 Subject: [PATCH 3/3] chore: exclude pnpm-lock.yaml from prettier pnpm's lock output doesn't match prettier's canonical yaml style; letting prettier rewrite it produces huge noisy diffs on every lockfile bump. Exclude it like other generated files. --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index e87d9e5..92ad233 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,3 +8,4 @@ build/ *.tfstate.* coverage/ deployment/ +pnpm-lock.yaml