refactor(prisma): Prisma instrumentation rewrite#7447
Conversation
Overall package sizeSelf size: 4.58 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 813.08 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7447 +/- ##
==========================================
- Coverage 80.41% 80.34% -0.07%
==========================================
Files 732 731 -1
Lines 31072 31093 +21
==========================================
- Hits 24986 24983 -3
- Misses 6086 6110 +24 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmark execution time: 2026-02-05 20:22:57 Comparing candidate commit a6e9d37 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 228 metrics, 32 unstable metrics. |
BridgeAR
left a comment
There was a problem hiding this comment.
The code is LGTM, I think it would just be good to add a few more actual integration tests.
Co-authored-by: Ruben Bridgewater <[email protected]>
* initial changes * Update tests * removed unsused tests * remove require * remove unhelpful comments * Update packages/datadog-plugin-prisma/test/index.spec.js Co-authored-by: Ruben Bridgewater <[email protected]> --------- Co-authored-by: Ruben Bridgewater <[email protected]>
* initial changes * Update tests * removed unsused tests * remove require * remove unhelpful comments * Update packages/datadog-plugin-prisma/test/index.spec.js Co-authored-by: Ruben Bridgewater <[email protected]> --------- Co-authored-by: Ruben Bridgewater <[email protected]>
* initial changes * Update tests * removed unsused tests * remove require * remove unhelpful comments * Update packages/datadog-plugin-prisma/test/index.spec.js Co-authored-by: Ruben Bridgewater <[email protected]> --------- Co-authored-by: Ruben Bridgewater <[email protected]>
* initial changes * Update tests * removed unsused tests * remove require * remove unhelpful comments * Update packages/datadog-plugin-prisma/test/index.spec.js Co-authored-by: Ruben Bridgewater <[email protected]> --------- Co-authored-by: Ruben Bridgewater <[email protected]>
What does this PR do?
Introduces an explicit separation of the instrumentation logic and plugin logic for the Prisma plugin.
Prisma’s getPrismaClient()and publishes a single diagnostic-channel event to let the plugin provide the tracing helper.apm:prisma:helper:initand injects a DatadogTracingHelper instance, keeping span creation and Datadog-specific logic out of the instrumentation layer.Motivation
We want a clear boundary between the instrumentation layer
packages/datadog-instrumentations/src/prisma.jsand the plugin logicpackages/datadog-plugin-prisma). That separation was previously not being respected and blocked supporting specific Prisma tracing features (getTraceParent,getActiveContext) without leaking responsibilities across layers.Additional Notes