fix: use statsForApp when application is set without routeId
The stats endpoint was calling statsForRoute(null, agentIds) when only application was set — this filtered by route_id=null, returning zero results. Now correctly routes to statsForApp/timeseriesForApp which queries the stats_1m_app continuous aggregate by application_name. Also reverts the group parameter alias workaround — the deployed backend correctly accepts 'application'. Three code paths now: - No filters → stats_1m_all (global) - application only → stats_1m_app (per-app) - routeId (±application) → stats_1m_route (per-route) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,10 @@ public class SearchService {
|
||||
return statsStore.stats(from, to);
|
||||
}
|
||||
|
||||
public ExecutionStats statsForApp(Instant from, Instant to, String applicationName) {
|
||||
return statsStore.statsForApp(from, to, applicationName);
|
||||
}
|
||||
|
||||
public ExecutionStats stats(Instant from, Instant to, String routeId, List<String> agentIds) {
|
||||
return statsStore.statsForRoute(from, to, routeId, agentIds);
|
||||
}
|
||||
@@ -36,6 +40,10 @@ public class SearchService {
|
||||
return statsStore.timeseries(from, to, bucketCount);
|
||||
}
|
||||
|
||||
public StatsTimeseries timeseriesForApp(Instant from, Instant to, int bucketCount, String applicationName) {
|
||||
return statsStore.timeseriesForApp(from, to, bucketCount, applicationName);
|
||||
}
|
||||
|
||||
public StatsTimeseries timeseries(Instant from, Instant to, int bucketCount,
|
||||
String routeId, List<String> agentIds) {
|
||||
return statsStore.timeseriesForRoute(from, to, bucketCount, routeId, agentIds);
|
||||
|
||||
Reference in New Issue
Block a user