feat(api): add Prometheus metrics and OpenTelemetry instrumentation for HTTP, auth, classifications, and diagnoses

This commit is contained in:
MythEclipse
2026-06-07 18:12:32 +07:00
parent 3b7ccad619
commit ede1c480be
9 changed files with 128 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
import { Elysia } from 'elysia';
import { getMetrics, getMetricsContentType } from '../lib/telemetry';
export const metricsRoutes = new Elysia()
.get('/metrics', async () => {
const body = await getMetrics();
return new Response(body, {
headers: { 'Content-Type': getMetricsContentType() },
});
});