Add per-server telemetry request diagnostics

This commit is contained in:
2026-09-19 18:59:30 -04:00
parent a182aeb950
commit 41891b4209
10 changed files with 614 additions and 14 deletions
@@ -0,0 +1,11 @@
import { json } from '@sveltejs/kit';
import { getServer } from '$lib/server/fleet/servers.js';
import { listTelemetryRequests } from '$lib/server/fleet/telemetry-requests.js';
import { TELEMETRY_REQUEST_RETENTION } from '$lib/telemetry-diagnostics.js';
export async function GET({ params }: { params: { name: string } }) {
if (!getServer(params.name)) return json({ ok: false, error: 'no such server' }, { status: 404 });
return json({ ok: true, requests: listTelemetryRequests(params.name), retention: TELEMETRY_REQUEST_RETENTION }, {
headers: { 'Cache-Control': 'no-store' }
});
}