WIP feat(opentelemetry): Add SentryTraceProvider#21181
Conversation
size-limit report 📦
|
0f2020a to
71e7c69
Compare
| */ | ||
| public recordException(_exception: unknown, _time?: number | undefined): void { | ||
| // noop | ||
| public recordException(exception: unknown, time?: SpanTimeInput | undefined): void { |
There was a problem hiding this comment.
I think we can leave this as noop, we do not care about this and do not really support it, doing nothing with events etc.
71e7c69 to
a44215e
Compare
# Conflicts: # dev-packages/e2e-tests/test-applications/nextjs-13/instrumentation.ts # dev-packages/e2e-tests/test-applications/nextjs-14/instrumentation.ts # dev-packages/e2e-tests/test-applications/nextjs-15-basepath/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-15-intl/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-15/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-16-cacheComponents/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-16-streaming/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-16-trailing-slash/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-16-tunnel/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-16-userfeedback/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-16/sentry.server.config.ts # dev-packages/e2e-tests/test-applications/nextjs-app-dir/instrumentation.ts # dev-packages/e2e-tests/test-applications/nextjs-pages-dir/instrumentation.ts # dev-packages/e2e-tests/test-applications/supabase-nextjs/sentry.server.config.ts
SentryNonRecordingSpan can now store a `sampled` flag that distinguishes "sampled negative" from "no sampling decision yet" in TwP mode. Trace header generation uses the new `spanToTraceSamplingDecision` helper to propagate this decision instead of always inferring from traceFlags. Also aligns `recordException` signature to use `SpanTimeInput` on both the Span interface and its implementations. Co-Authored-By: Claude <noreply@anthropic.com>
cf369b6 to
749e7e7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2f23900. Configure here.
| const span = new SentryNonRecordingSpan({ | ||
| traceId: propagationContext.traceId, | ||
| parentSpanId: propagationContext.parentSpanId, | ||
| }); |
There was a problem hiding this comment.
Ignored parent span id
Medium Severity
When tracing is disabled, createChildOrRootSpan builds a SentryNonRecordingSpan with parentSpanId, but the non-recording span constructor never stores that field. Child placeholder spans lose their parent link in span context and JSON, so propagation and hierarchy can be wrong under tracing-without-performance.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2f23900. Configure here.
a0be013 to
2f2c2c6
Compare
2f2c2c6 to
fe36106
Compare


WIP