Skip to content

Commit 8fa393c

Browse files
authored
fix(node): Change import of @prisma/instrumentation to use default import (#12185)
1 parent 186e982 commit 8fa393c

File tree

1 file changed

+6
-1
lines changed
  • packages/node/src/integrations/tracing

1 file changed

+6
-1
lines changed

packages/node/src/integrations/tracing/prisma.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ const _prismaIntegration = (() => {
88
return {
99
name: 'Prisma',
1010
setupOnce() {
11+
const EsmInteropPrismaInstrumentation: typeof prismaInstrumentation.PrismaInstrumentation =
12+
// @ts-expect-error We need to do the following for interop reasons
13+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
14+
prismaInstrumentation.default?.PrismaInstrumentation || prismaInstrumentation.PrismaInstrumentation;
15+
1116
addOpenTelemetryInstrumentation(
1217
// does not have a hook to adjust spans & add origin
13-
new prismaInstrumentation.PrismaInstrumentation({}),
18+
new EsmInteropPrismaInstrumentation({}),
1419
);
1520
},
1621

0 commit comments

Comments
 (0)