Skip to content

Commit 2774d1a

Browse files
authored
feat(node): Do not include prismaIntegration by default (#11265)
This seems to have issues in ESM builds (not just in astro, but also saw it in remix), so for now removing this from defaults - users can still add it manually if needed. We may find a better solution for this before v8 is stable.
1 parent c75f93e commit 2774d1a

File tree

3 files changed

+5
-6
lines changed
  • dev-packages/node-integration-tests/suites/tracing-experimental/prisma-orm
  • packages
    • astro/src/server
    • node-experimental/src/integrations/tracing

3 files changed

+5
-6
lines changed

dev-packages/node-integration-tests/suites/tracing-experimental/prisma-orm/scenario.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Sentry.init({
99
release: '1.0',
1010
tracesSampleRate: 1.0,
1111
transport: loggingTransport,
12+
integrations: [Sentry.prismaIntegration()],
1213
});
1314

1415
// Stop the process from exiting before the transaction is sent

packages/astro/src/server/sdk.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { applySdkMetadata } from '@sentry/core';
22
import type { NodeOptions } from '@sentry/node';
3-
import { getDefaultIntegrations } from '@sentry/node';
43
import { init as initNodeSdk, setTag } from '@sentry/node';
54

65
/**
@@ -10,9 +9,6 @@ import { init as initNodeSdk, setTag } from '@sentry/node';
109
export function init(options: NodeOptions): void {
1110
const opts = {
1211
...options,
13-
// TODO v8: For now, we disable the Prisma integration, because that has weird esm-cjs interop issues
14-
// We should figure these out and fix these before v8 goes stable.
15-
defaultIntegrations: getDefaultIntegrations(options).filter(integration => integration.name !== 'Prisma'),
1612
};
1713
applySdkMetadata(opts, 'astro', ['astro', 'node']);
1814

packages/node-experimental/src/integrations/tracing/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { mysqlIntegration } from './mysql';
1111
import { mysql2Integration } from './mysql2';
1212
import { nestIntegration } from './nest';
1313
import { postgresIntegration } from './postgres';
14-
import { prismaIntegration } from './prisma';
1514

1615
/**
1716
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
@@ -26,7 +25,10 @@ export function getAutoPerformanceIntegrations(): Integration[] {
2625
mysqlIntegration(),
2726
mysql2Integration(),
2827
postgresIntegration(),
29-
prismaIntegration(),
28+
// For now, we do not include prisma by default because it has ESM issues
29+
// See https://github.com/prisma/prisma/issues/23410
30+
// TODO v8: Figure out a better solution for this, maybe only disable in ESM mode?
31+
// prismaIntegration(),
3032
nestIntegration(),
3133
hapiIntegration(),
3234
koaIntegration(),

0 commit comments

Comments
 (0)