Files
zeavis-edu/apps/api/src/routes/metrics.ts
T

11 lines
322 B
TypeScript

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() },
});
});