ref(node): Streamline Prisma instrumentation (v6 and v7)#21819
Conversation
size-limit report 📦
|
| public getActiveContext(): Span | undefined { | ||
| return getActiveSpan(); | ||
| } |
There was a problem hiding this comment.
This seems weird to me 😬 but I can't tell if it's ok or not. We'd need to investigate when exactly getActiveContext was called before and if it's fine receiving a span now?
There was a problem hiding this comment.
from what I can tell this should be fine, the output of getActiveContext is only used by getTraceParent which we also control
| } | ||
|
|
||
| const context = options.context ?? _context.active(); | ||
| const parentSpan = options.context ?? getActiveSpan(); |
There was a problem hiding this comment.
Also here, context being a span, is that right?
There was a problem hiding this comment.
options.context was dead it seems, so I simplified this
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f769463. Configure here.

Streamlines the vendored Prisma instrumentation onto Sentry's span APIs (v6/v7):
spanStarthook into span creation in the instrumentation.startSpanManual/startInactiveSpanfrom@sentry/coreinstead of the OTel tracer in the vendored tracing helper.setTracerProvider/tracerProviderand unused contract types (EngineTrace,EngineTraceEvent,LogLevel).v5 cleanup will be done in a followup.
Part of #20744
Closes #21820