Skip to content

feat(nextjs): Skip OTEL root spans emitted by Next.js #11623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Apr 16, 2024

We now skip any OTEL spans that Next.js emits, unless we already have a parent span that was created elsewhere (e.g. by our auto instrumentation). This way, we should be able to ensure consistent root spans for all cases.

@mydea mydea self-assigned this Apr 16, 2024
Copy link
Contributor

github-actions bot commented Apr 16, 2024

size-limit report 📦

Path Size
@sentry/browser 21.67 KB (-2.23% 🔽)
@sentry/browser (incl. Tracing) 31.28 KB (-1.55% 🔽)
@sentry/browser (incl. Tracing, Replay) 66.59 KB (-0.73% 🔽)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 59.99 KB (-0.84% 🔽)
@sentry/browser (incl. Tracing, Replay with Canvas) 70.43 KB (-0.67% 🔽)
@sentry/browser (incl. Tracing, Replay, Feedback) 80.28 KB (-0.64% 🔽)
@sentry/browser (incl. Feedback) 35.24 KB (-1.31% 🔽)
@sentry/browser (incl. Feedback, Feedback Modal) 35.25 KB (-1.31% 🔽)
@sentry/browser (incl. Feedback, Feedback Modal, Feedback Screenshot) 37.27 KB (-1.24% 🔽)
@sentry/browser (incl. sendFeedback) 26.46 KB (-1.81% 🔽)
@sentry/react 24.35 KB (-1.97% 🔽)
@sentry/react (incl. Tracing) 34.17 KB (-1.41% 🔽)
@sentry/vue 25.2 KB (-2.04% 🔽)
@sentry/vue (incl. Tracing) 32.99 KB (-1.45% 🔽)
@sentry/svelte 21.79 KB (-2.22% 🔽)
CDN Bundle 24.03 KB (-1.82% 🔽)
CDN Bundle (incl. Tracing) 32.58 KB (-1.26% 🔽)
CDN Bundle (incl. Tracing, Replay) 66.22 KB (-0.57% 🔽)
CDN Bundle (incl. Tracing, Replay, Feedback) 82.4 KB (-0.49% 🔽)
CDN Bundle - uncompressed 70.86 KB (-2.79% 🔽)
CDN Bundle (incl. Tracing) - uncompressed 96.98 KB (-2.06% 🔽)
CDN Bundle (incl. Tracing, Replay) - uncompressed 206.64 KB (-0.98% 🔽)
@sentry/nextjs (client) 33.51 KB (-1.51% 🔽)
@sentry/sveltekit (client) 31.77 KB (-1.53% 🔽)
@sentry/node 124.21 KB (-0.36% 🔽)

@mydea mydea changed the title feat(nextjs): Skip OTEL spans emitted by Next.js feat(nextjs): Skip OTEL root spans emitted by Next.js Apr 16, 2024
@mydea mydea marked this pull request as ready for review April 16, 2024 11:32
@mydea mydea requested review from s1gr1d and lforst April 16, 2024 11:32
@mydea mydea force-pushed the fn/skip-next-spans branch from bdab4bb to b078f9b Compare April 16, 2024 14:34
@mydea mydea merged commit 0d2c960 into develop Apr 16, 2024
@mydea mydea deleted the fn/skip-next-spans branch April 16, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants