-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Problems with Next.js SDK + OTEL #11046
Comments
I created a Next.js test application based on this PR where I excluded our HTTP integration. I tried different scenarios ( I will differentiate between up until Next.js v14.0.1-canary.0 and from v14.0.1-canary.1 ongoing, because that made the biggest difference in the outcome. As it is about checking the spans created by route handlers, most of the logic and Until Next.js 14.0.1-canary.0 (also v13)When fetching, the
The traces show up correctly (except for the parameter) in Spotlight. With a When including the After Next.js 14.0.1-canary.1When fetching,
Spotlight does not show any traces coming in. Wrapping the route handler code in a Only when adding |
Just a collection of things I noticed when trying out the Next.js SDK with our newest OTEL implementation. This list is WIP:
Findings:
Sentry.init()
.@vercel/otel
package has support for Edge runtime fetch instrumentation. We need to try this out.Problems:
forceTransaction: true
for our own spans.instrument.ts
to init the SDK will destroy parent-child relationships between Next.js spans and Sentry SDK spans. No friggin idea what is going on here.instrumentation.ts
waitUntil
coming in Next.js which could solve this. Right now I don't have an idea on how to fix this. I tried adding a SIGTERM handler, I tried adding a custom spanprocessor that flushes. Nothing works.--turbo
flag:require-in-the-middle
is resolved toimport-in-the-middle
and crashing with turbopack vercel/next.js#64022require
to loadpackage.json
files open-telemetry/opentelemetry-js#4593The text was updated successfully, but these errors were encountered: