Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Prisma 8 support for `prismaIntegration`

Đang mở
#24,237 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@chargome đang làm issue này rồi.

Từ ngày 9/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Integration: prisma Package: node

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 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).
  • 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.
  • No serialize span. connect only if the lazy pool creation in @prisma/orm-postgres/dist/runtime.mjs is patchable cleanly.
  • Wire it through prismaIntegration so @sentry/node and @sentry/cloudflare/nodejs_compat stay 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: prismaIntegration JSDoc 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, but versionRange must be pinned tightly and revisited at 8.0 stable.
  • .all() returns a thenable that only runs the query when awaited; check the Auto kind's promise handling against that shape.
  • Prisma's marker-verification and BEGIN/COMMIT statements will nest under the operation span, unlike v7.
  • v8 CLI needs Node ≥22.18; DateTime columns decode to Temporal (global only on Node 26).

References:

Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.9k
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
562

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-javascript

Tất cả issue của getsentry/sentry-javascript

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.