From 0fe774868493e7592182df68f3d1d027af22d6d1 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Thu, 16 Apr 2026 11:31:56 +0200 Subject: [PATCH] agent metrics session limit bump to 500 --- src/Agent/AutopilotMonitor.Agent/buildcounter.txt | 2 +- .../Services/PlatformMetricsService.cs | 4 ++-- .../app/admin/metrics/sections/SectionAgentMetrics.tsx | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt index 748632cf..9540e56f 100644 --- a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt @@ -1 +1 @@ -996 +1006 diff --git a/src/Backend/AutopilotMonitor.Functions/Services/PlatformMetricsService.cs b/src/Backend/AutopilotMonitor.Functions/Services/PlatformMetricsService.cs index 13c48fae..c13b073d 100644 --- a/src/Backend/AutopilotMonitor.Functions/Services/PlatformMetricsService.cs +++ b/src/Backend/AutopilotMonitor.Functions/Services/PlatformMetricsService.cs @@ -74,8 +74,8 @@ namespace AutopilotMonitor.Functions.Services private async Task ComputePlatformMetricsInternalAsync() { - // 1. Fetch the 100 most recent sessions across all tenants - var page = await _sessionRepo.GetAllSessionsAsync(maxResults: 100); + // 1. Fetch the 500 most recent sessions across all tenants + var page = await _sessionRepo.GetAllSessionsAsync(maxResults: 500); var allSessions = page.Sessions; if (allSessions.Count == 0) diff --git a/src/Web/autopilot-monitor-web/app/admin/metrics/sections/SectionAgentMetrics.tsx b/src/Web/autopilot-monitor-web/app/admin/metrics/sections/SectionAgentMetrics.tsx index ae706d2f..b1d9c40e 100644 --- a/src/Web/autopilot-monitor-web/app/admin/metrics/sections/SectionAgentMetrics.tsx +++ b/src/Web/autopilot-monitor-web/app/admin/metrics/sections/SectionAgentMetrics.tsx @@ -136,7 +136,7 @@ export function SectionAgentMetrics() { const [loading, setLoading] = useState(true); const [sessionMetrics, setSessionMetrics] = useState([]); - const [sampleSize, setSampleSize] = useState(20); + const [sampleSize, setSampleSize] = useState(100); const [error, setError] = useState(null); const [versionFilter, setVersionFilter] = useState('all'); const [cacheInfo, setCacheInfo] = useState<{ fromCache: boolean; computeDurationMs: number; computedAt: string } | null>(null); @@ -313,10 +313,11 @@ export function SectionAgentMetrics() { onChange={(e) => setSampleSize(Number(e.target.value))} className="text-sm border border-gray-300 rounded-md px-2 py-1" > - + + {availableVersions.length > 1 && ( <>