prisma: TypeError: this.getGlobalTracingHelper(...).dispatchEngineSpans is not a function
Bug description
We started seeing this error after upgrading to 6.1.0
How to reproduce
We use a 3rd party monitoring platform (highlight.io). Their sdk leverages opentelemetry and it appears that this is crashing prisma with this error: TypeError: this.getGlobalTracingHelper(…).dispatchEngineSpans is not a function.
Expected behavior
The application should not crash.
Prisma information
N/A
Environment & setup
- OS: macOS, Debian
- Database: PostgreSQL
- Node.js version: 22
Prisma Version
prisma : 6.1.0
@prisma/client : 6.1.0
Computed binaryTarget : darwin-arm64
Operating System : darwin
Architecture : arm64
Node.js : v22.12.0
Query Engine (Node-API) : libquery-engine 11f085a2012c0f4778414c8db2651556ee0ef959 (at ../node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)
Schema Engine : schema-engine-cli 11f085a2012c0f4778414c8db2651556ee0ef959 (at ../node_modules/@prisma/engines/schema-engine-darwin-arm64)
Schema Wasm : @prisma/prisma-schema-wasm 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959
Default Engines Hash : 11f085a2012c0f4778414c8db2651556ee0ef959
Studio : 0.503.0
Preview Features : relationJoins
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 15 (7 by maintainers)
For anyone else who lands here, I’ve found that
@sentry/nodecurrently uses 5.22.0 of@prisma/instrumentationwhich causes this.https://github.com/getsentry/sentry-javascript/issues/15063
Experiencing the same issue on 6.2.0.
So Issue sadly still persists in 6.2.0.
I hit this error upgrading to Prisma
v6.2.0, realised I still had outdated (v5) version of@prisma/instrumentation. Also upgraded peer dependency@opentelemetry/instrumentationfromv0.53.0tov0.56.0- not checked which caused it but between these two updates the error was resolved.thanks @aqrln … sounds like highlight should make this a peer dependency. i’ve create an issue for them to look into it: https://github.com/highlight/highlight/issues/9753
yes I ensured consistent version numbers across all @opentelemetry/* packages - same
v0.xx, samev1.xxas appropriate for the packages currently using stable vs. “experimental”/unstable (pre v1) versioning