fix(monitoring): exclude unconfigured routes from domain activity aggregation
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# 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)
|
## 2026-04-13 - 13.17.1 - fix(monitoring)
|
||||||
stop allocating route metrics to domains when no request data exists
|
stop allocating route metrics to domains when no request data exists
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/dcrouter',
|
name: '@serve.zone/dcrouter',
|
||||||
version: '13.17.1',
|
version: '13.17.2',
|
||||||
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -792,7 +792,6 @@ export class MetricsManager {
|
|||||||
routeCount: number;
|
routeCount: number;
|
||||||
requestCount: number;
|
requestCount: number;
|
||||||
}>();
|
}>();
|
||||||
const accountedRoutes = new Set<string>();
|
|
||||||
|
|
||||||
for (const [domain, routeNames] of domainToRoutes) {
|
for (const [domain, routeNames] of domainToRoutes) {
|
||||||
const domainReqs = domainRequestTotals.get(domain) || 0;
|
const domainReqs = domainRequestTotals.get(domain) || 0;
|
||||||
@@ -801,7 +800,6 @@ export class MetricsManager {
|
|||||||
let totalOut = 0;
|
let totalOut = 0;
|
||||||
|
|
||||||
for (const routeName of routeNames) {
|
for (const routeName of routeNames) {
|
||||||
accountedRoutes.add(routeName);
|
|
||||||
const conns = connectionsByRoute.get(routeName) || 0;
|
const conns = connectionsByRoute.get(routeName) || 0;
|
||||||
const tp = throughputByRoute.get(routeName) || { in: 0, out: 0 };
|
const tp = throughputByRoute.get(routeName) || { in: 0, out: 0 };
|
||||||
const routeTotal = routeTotalRequests.get(routeName) || 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())
|
const domainActivity = Array.from(domainAgg.entries())
|
||||||
.map(([domain, data]) => ({
|
.map(([domain, data]) => ({
|
||||||
domain,
|
domain,
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/dcrouter',
|
name: '@serve.zone/dcrouter',
|
||||||
version: '13.17.1',
|
version: '13.17.2',
|
||||||
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user