Title: Prisma 8 support for `prismaIntegration` · Issue #24237 · getsentry/sentry-javascript · GitHub
Open Graph Title: Prisma 8 support for `prismaIntegration` · Issue #24237 · getsentry/sentry-javascript
X Title: Prisma 8 support for `prismaIntegration` · Issue #24237 · getsentry/sentry-javascript
Description: Prisma 8 ("Prisma Next", @prisma/orm-postgres, currently 8.0.0-rc.8) ships no tracing surface. It never reads the global PRISMA_INSTRUMENTATION helper, so prismaIntegration is inert. Only raw pg spans from postgresIntegration remain: one...
Open Graph Description: Prisma 8 ("Prisma Next", @prisma/orm-postgres, currently 8.0.0-rc.8) ships no tracing surface. It never reads the global PRISMA_INSTRUMENTATION helper, so prismaIntegration is inert. Only raw pg sp...
X Description: Prisma 8 ("Prisma Next", @prisma/orm-postgres, currently 8.0.0-rc.8) ships no tracing surface. It never reads the global PRISMA_INSTRUMENTATION helper, so prismaIntegration is inert. Only...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24237
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Prisma 8 support for `prismaIntegration`","articleBody":"Prisma 8 (\"Prisma Next\", `@prisma/orm-postgres`, currently 8.0.0-rc.8) ships no tracing surface. It never reads the global `PRISMA_INSTRUMENTATION` helper, so `prismaIntegration` is inert. Only raw `pg` spans from `postgresIntegration` remain: one flat `db` span per statement, plus Prisma's marker-verification and `BEGIN`/`COMMIT` housekeeping queries as siblings. The v7 span tree (`prisma:client:operation` with `model`/`method`, `serialize`, `connect`, nested `db_query`) is gone.\n\n**Goal:** roughly the same spans on Prisma 8 as on v7.\n\n**Approach:** instrument via orchestrion, like the other server-utils integrations. No user code needed, works with the runtime loader hook and the bundler plugins.\n\n- Patch the `CollectionImpl` methods (`create`, `createAll`, `upsert`, `update`, `updateAll`, `delete`, `deleteAll`, `all`, `first`, `count`, `aggregate`) in `@prisma/orm-family-sql/dist/orm-client.mjs` for `prisma:client:operation` (origin `auto.db.prisma`, `model`/`method` attributes).\n- Patch `execute(plan, options)` on the runtime base class in `@prisma/orm-family-sql/dist/runtime.mjs` so the `pg` query spans nest under the operation. The plan carries `meta.lane` and annotations.\n- No `serialize` span. `connect` only if the lazy pool creation in `@prisma/orm-postgres/dist/runtime.mjs` is patchable cleanly.\n- Wire it through `prismaIntegration` so `@sentry/node` and `@sentry/cloudflare/nodejs_compat` stay the entry points.\n\n**Scope:**\n- Orchestrion config + channel subscriber for the above.\n- Extend `dev-packages/node-integration-tests/suites/tracing/prisma-orm-v8` (currently pins the inert behaviour) to assert the v7-shaped tree.\n- Docs: `prismaIntegration` JSDoc and Sentry docs say \"v6 and v7\"; add v8.\n\n**Risks / constraints:**\n- Patch points live in `@prisma/orm-family-sql`, a transitive dependency. The two files are unhashed, but `versionRange` must be pinned tightly and revisited at 8.0 stable.\n- `.all()` returns a thenable that only runs the query when awaited; check the `Auto` kind's promise handling against that shape.\n- Prisma's marker-verification and `BEGIN`/`COMMIT` statements will nest under the operation span, unlike v7.\n- v8 CLI needs Node ≥22.18; `DateTime` columns decode to `Temporal` (global only on Node 26).\n\n**References:**\n- Prisma scorecard, \"OpenTelemetry tracing spans: not in 8.0\": https://github.com/prisma/orm/blob/main/scorecard/19-observability-and-lifecycle.md\n- Telemetry design: https://github.com/prisma/orm/blob/main/docs/architecture%20docs/adrs/ADR%20024%20-%20Telemetry%20Schema.md\n","author":{"url":"https://github.com/chargome","@type":"Person","name":"chargome"},"datePublished":"2026-09-09T10:46:06Z","url":"https://github.com/getsentry/sentry-javascript/issues/24237"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eef76daf-d2a6-db13-8475-de8afe469cf1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D57A:F4D72:5C1928:7D5084:6B04418E |
| html-safe-nonce | ff90fa5894d4954c278f5c6631f07267560a3e6580946138e5564083a07f8778 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTdBOkY0RDcyOjVDMTkyODo3RDUwODQ6NkIwNDQxOEUiLCJ2aXNpdG9yX2lkIjoiNzkxODk4OTIyNTMxNDUwMTAwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2d2205d3216f24abef76e0d6dea97c7e3dd124fb4e2a292212e6bfd43c0a07da |
| hovercard-subject-tag | issue:5398382885 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/24237/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c60b15d9be06b7673819018d94411c3084034200d8d9b859f8823b7e2dff387e/getsentry/sentry-javascript/issues/24237 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c60b15d9be06b7673819018d94411c3084034200d8d9b859f8823b7e2dff387e/getsentry/sentry-javascript/issues/24237 |
| og:image:alt | Prisma 8 ("Prisma Next", @prisma/orm-postgres, currently 8.0.0-rc.8) ships no tracing surface. It never reads the global PRISMA_INSTRUMENTATION helper, so prismaIntegration is inert. Only raw pg sp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chargome |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width