Spaces:
Sleeping
Sleeping
File size: 442 Bytes
fc69895 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import { config } from "$lib/server/config";
import { MetricsServer } from "$lib/server/metrics";
export async function GET() {
if (config.METRICS_ENABLED !== "true") {
return new Response("Not Found", { status: 404 });
}
const payload = await MetricsServer.getInstance().render();
return new Response(payload, {
status: 200,
headers: {
"Content-Type": "text/plain; version=0.0.4",
"Cache-Control": "no-store",
},
});
}
|