From 1bbf31605cda31059a633e11d950263b2cf49c1c Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 13 Apr 2026 19:17:46 +0000 Subject: [PATCH] fix(monitoring): exclude unconfigured routes from domain activity aggregation --- changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- ts/monitoring/classes.metricsmanager.ts | 25 ------------------------- ts_web/00_commitinfo_data.ts | 2 +- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/changelog.md b/changelog.md index 83218f0..cbf6e21 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-04-13 - 13.17.2 - fix(monitoring) +exclude unconfigured routes from domain activity aggregation + +- Removes fallback aggregation that reported routes without domain configuration as synthetic domain entries based on route names +- Keeps domain activity focused on configured domain mappings when splitting connection and throughput metrics + ## 2026-04-13 - 13.17.1 - fix(monitoring) stop allocating route metrics to domains when no request data exists diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 023149a..03efc38 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '13.17.1', + version: '13.17.2', description: 'A multifaceted routing service handling mail and SMS delivery functions.' } diff --git a/ts/monitoring/classes.metricsmanager.ts b/ts/monitoring/classes.metricsmanager.ts index d3bce36..125cc96 100644 --- a/ts/monitoring/classes.metricsmanager.ts +++ b/ts/monitoring/classes.metricsmanager.ts @@ -792,7 +792,6 @@ export class MetricsManager { routeCount: number; requestCount: number; }>(); - const accountedRoutes = new Set(); for (const [domain, routeNames] of domainToRoutes) { const domainReqs = domainRequestTotals.get(domain) || 0; @@ -801,7 +800,6 @@ export class MetricsManager { let totalOut = 0; for (const routeName of routeNames) { - accountedRoutes.add(routeName); const conns = connectionsByRoute.get(routeName) || 0; const tp = throughputByRoute.get(routeName) || { in: 0, out: 0 }; const routeTotal = routeTotalRequests.get(routeName) || 0; @@ -821,29 +819,6 @@ export class MetricsManager { }); } - // Include routes with no domain config (fallback: use route name) - for (const [routeName, activeConns] of connectionsByRoute) { - if (accountedRoutes.has(routeName)) continue; - if (routeDomains.has(routeName)) continue; - const tp = throughputByRoute.get(routeName) || { in: 0, out: 0 }; - if (activeConns === 0 && tp.in === 0 && tp.out === 0) continue; - const existing = domainAgg.get(routeName); - if (existing) { - existing.activeConnections += activeConns; - existing.bytesInPerSec += tp.in; - existing.bytesOutPerSec += tp.out; - existing.routeCount++; - } else { - domainAgg.set(routeName, { - activeConnections: activeConns, - bytesInPerSec: tp.in, - bytesOutPerSec: tp.out, - routeCount: 1, - requestCount: 0, - }); - } - } - const domainActivity = Array.from(domainAgg.entries()) .map(([domain, data]) => ({ domain, diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 023149a..03efc38 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '13.17.1', + version: '13.17.2', description: 'A multifaceted routing service handling mail and SMS delivery functions.' }