We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7b473c commit a1bb023Copy full SHA for a1bb023
apps/webapp/app/routes/metrics.ts
@@ -13,7 +13,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
13
}
14
15
16
- const prismaMetrics = await prisma.$metrics.prometheus();
+ // We need to remove empty lines from the prisma metrics, grafana doesn't like them
17
+ const prismaMetrics = (await prisma.$metrics.prometheus()).replace(/^\s*[\r\n]/gm, "");
18
const coreMetrics = await metricsRegister.metrics();
19
20
// Order matters, core metrics end with `# EOF`, prisma metrics don't
0 commit comments