refactor(alerting): rename P95_LATENCY_MS → AVG_DURATION_MS to match what stats_1m_route exposes
The evaluator mapped P95_LATENCY_MS to ExecutionStats.avgDurationMs because stats_1m_route has no p95 column. Exposing the old name implied p95 semantics operators did not get. Rename to AVG_DURATION_MS makes the contract honest. Updated RouteMetric enum (with javadoc), evaluator switch, and admin guide. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,8 +48,7 @@ public class RouteMetricEvaluator implements ConditionEvaluator<RouteMetricCondi
|
||||
|
||||
double actual = switch (c.metric()) {
|
||||
case ERROR_RATE -> errorRate(stats);
|
||||
// ExecutionStats has no p95 field; avgDurationMs is the closest available proxy
|
||||
case P95_LATENCY_MS -> (double) stats.avgDurationMs();
|
||||
case AVG_DURATION_MS -> (double) stats.avgDurationMs();
|
||||
case P99_LATENCY_MS -> (double) stats.p99LatencyMs();
|
||||
case THROUGHPUT -> (double) stats.totalCount();
|
||||
case ERROR_COUNT -> (double) stats.failedCount();
|
||||
|
||||
Reference in New Issue
Block a user