feat(api): add Prometheus metrics and OpenTelemetry instrumentation for HTTP, auth, classifications, and diagnoses
This commit is contained in:
@@ -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() },
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user