Skip to content

Commit dc25147

Browse files
committed
Setup Sentry performance monitoring for DB queries
1 parent 5c74ac5 commit dc25147

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
import { posthog, PostHogSentryIntegration } from '$lib/server/posthog';
22
import type { Integration } from '@sentry/types';
3+
import * as Sentry from '@sentry/sveltekit';
4+
import { prisma } from '$lib/server/prisma';
35

46
export function getServerSentryIntegrations(
57
organization: string | undefined,
68
): Integration[] {
9+
const integrations: Integration[] = [
10+
new Sentry.Integrations.Prisma({ client: prisma }),
11+
];
12+
713
if (posthog && organization) {
8-
return [new PostHogSentryIntegration(posthog, undefined, organization)];
14+
integrations.unshift(
15+
new PostHogSentryIntegration(posthog, undefined, organization),
16+
);
917
}
1018

11-
return [];
19+
return integrations;
1220
}

0 commit comments

Comments
 (0)