Prisma 8 support for `prismaIntegration`
@chargome 已经在做这个了。
开始于 2026年9月9日。
评估
这个 Issue 还没有评估数据。
描述
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.
Goal: roughly the same spans on Prisma 8 as on v7.
Approach: instrument via orchestrion, like the other server-utils integrations. No user code needed, works with the runtime loader hook and the bundler plugins.
- Patch the
CollectionImplmethods (create,createAll,upsert,update,updateAll,delete,deleteAll,all,first,count,aggregate) in@prisma/orm-family-sql/dist/orm-client.mjsforprisma:client:operation(originauto.db.prisma,model/methodattributes). - Patch
execute(plan, options)on the runtime base class in@prisma/orm-family-sql/dist/runtime.mjsso thepgquery spans nest under the operation. The plan carriesmeta.laneand annotations. - No
serializespan.connectonly if the lazy pool creation in@prisma/orm-postgres/dist/runtime.mjsis patchable cleanly. - Wire it through
prismaIntegrationso@sentry/nodeand@sentry/cloudflare/nodejs_compatstay the entry points.
Scope:
- Orchestrion config + channel subscriber for the above.
- Extend
dev-packages/node-integration-tests/suites/tracing/prisma-orm-v8(currently pins the inert behaviour) to assert the v7-shaped tree. - Docs:
prismaIntegrationJSDoc and Sentry docs say "v6 and v7"; add v8.
Risks / constraints:
- Patch points live in
@prisma/orm-family-sql, a transitive dependency. The two files are unhashed, butversionRangemust be pinned tightly and revisited at 8.0 stable. .all()returns a thenable that only runs the query when awaited; check theAutokind's promise handling against that shape.- Prisma's marker-verification and
BEGIN/COMMITstatements will nest under the operation span, unlike v7. - v8 CLI needs Node ≥22.18;
DateTimecolumns decode toTemporal(global only on Node 26).
References:
- Prisma scorecard, "OpenTelemetry tracing spans: not in 8.0": https://github.com/prisma/orm/blob/main/scorecard/19-observability-and-lifecycle.md
- Telemetry design: https://github.com/prisma/orm/blob/main/docs/architecture%20docs/adrs/ADR%20024%20-%20Telemetry%20Schema.md
- 主要语言
- TypeScript
- 星标
- 8.7k
- 派生
- 1.9k
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 576
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-javascript 的其他 Issue
-
Browser Bug Next.js Traces Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/sentry-javascript#24672 · 1 条评论 ·
-
Flaky Test React Router Framework Spans Tests
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry-javascript#24348 · 1 条评论 ·
-
javascript
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/sentry-javascript#24200 · 2 条评论 ·
-
javascript Task
难度 2/5 1-3 小时 新手友好度 82/100
getsentry/sentry-javascript#24134 · 1 条评论 ·
-
Cloudflare Workers javascript Tests
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-javascript#24051 · 1 条评论 ·
查看 getsentry/sentry-javascript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·