Some checks failed
Deploy / deploy (push) Failing after 1m43s
- Add docker.nix for Nix-based Docker image builds - Update flake.nix with dockerImage package output - Add output: standalone to next.config.ts for production builds - Add /metrics endpoint for Prometheus scraping - Add Gitea Actions workflow calling shared deploy-nomad.yaml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17 lines
501 B
TypeScript
17 lines
501 B
TypeScript
// ABOUTME: Prometheus metrics endpoint at /metrics for standard scraping path.
|
|
// ABOUTME: Re-exports the same metrics as /api/metrics for Prometheus autodiscovery.
|
|
|
|
import { NextResponse } from "next/server";
|
|
import { metricsRegistry } from "@/lib/metrics";
|
|
|
|
export async function GET(): Promise<NextResponse> {
|
|
const metrics = await metricsRegistry.metrics();
|
|
|
|
return new NextResponse(metrics, {
|
|
status: 200,
|
|
headers: {
|
|
"Content-Type": metricsRegistry.contentType,
|
|
},
|
|
});
|
|
}
|