fix(monitoring): stop allocating route metrics to domains when no request data exists
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-04-13 - 13.17.1 - fix(monitoring)
|
||||
stop allocating route metrics to domains when no request data exists
|
||||
|
||||
- Removes the equal-split fallback for shared routes in MetricsManager.
|
||||
- Sets the proportional share to zero when a route has no recorded requests, avoiding inflated per-domain connection and throughput totals.
|
||||
|
||||
## 2026-04-13 - 13.17.0 - feat(monitoring,network-ui,routes)
|
||||
add request-based domain activity metrics and split routes into user and system views
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/dcrouter',
|
||||
version: '13.17.0',
|
||||
version: '13.17.1',
|
||||
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
||||
}
|
||||
|
||||
@@ -806,20 +806,7 @@ export class MetricsManager {
|
||||
const tp = throughputByRoute.get(routeName) || { in: 0, out: 0 };
|
||||
const routeTotal = routeTotalRequests.get(routeName) || 0;
|
||||
|
||||
// Proportional share based on actual request counts
|
||||
// Fall back to equal split only when no request data exists
|
||||
let share: number;
|
||||
if (routeTotal > 0 && domainReqs > 0) {
|
||||
share = domainReqs / routeTotal;
|
||||
} else {
|
||||
// Count how many resolved domains share this route
|
||||
let domainsInRoute = 0;
|
||||
for (const [, routes] of domainToRoutes) {
|
||||
if (routes.includes(routeName)) domainsInRoute++;
|
||||
}
|
||||
share = 1 / Math.max(domainsInRoute, 1);
|
||||
}
|
||||
|
||||
const share = routeTotal > 0 ? domainReqs / routeTotal : 0;
|
||||
totalConns += conns * share;
|
||||
totalIn += tp.in * share;
|
||||
totalOut += tp.out * share;
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/dcrouter',
|
||||
version: '13.17.0',
|
||||
version: '13.17.1',
|
||||
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user