-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prismaInstrumentation.PrismaInstrumentation is not a constructor #11216
Comments
This is prisma/prisma#23410 - tracked by #11070. Known issue that we will resolve before v8 comes out, maybe for now just have to disable prisma instrumentation in ESM builds (basically strip it out). |
Closing as duplicate. Thanks for the update. |
@jnicklas Re your comment #11070 (comment). Are you manually using the |
@lforst yes, that's what I'm doing, maybe this is no longer necessary in the new version? This was not mentioned in the upgrade guide, so I'm not sure. I know there are some default integrations, but it's not quite clear which ones those are, and what I actually need to do. |
Generally, for now you do need to still add it manually in v8 (see: https://docs.sentry.io/platforms/javascript/guides/node/performance/database/#supported-platforms). Can you show your |
Could not get it to work with Remix ESM. |
We'll need to investigate ESM support for this some more. I think there are some fundamental incpompatibilies there, but not 100% sure, cc @timfish and @AbhiPrasad you've looked into this more in the past! |
I had the same issue in an ESM build using Versions:
I fixed this with the following patch (applied with with patch-package) # patches/@sentry+node+8.3.0.patch
diff --git a/node_modules/@sentry/node/esm/integrations/tracing/prisma.js b/node_modules/@sentry/node/esm/integrations/tracing/prisma.js
index abe7880..0b2a7a6 100644
--- a/node_modules/@sentry/node/esm/integrations/tracing/prisma.js
+++ b/node_modules/@sentry/node/esm/integrations/tracing/prisma.js
@@ -1,5 +1,5 @@
import { _optionalChain } from '@sentry/utils';
-import * as prismaInstrumentation from '@prisma/instrumentation';
+import prismaInstrumentation from '@prisma/instrumentation';
import { defineIntegration, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry'; |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.0.0-alpha.4
Framework Version
No response
Link to Sentry event
No response
SDK Setup
N/A
Steps to Reproduce
Load script with
node --loader=import-in-the-middle/hook.mjs ./dist/bin/server.js
Gives error:
What worked was a dumb patch:
All other modules load fine.
The text was updated successfully, but these errors were encountered: