Skip to content

No Server Spans or Profiles when using nodeProfilingIntegration on Vercel #15949

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

Open
3 tasks done
landenai opened this issue Apr 1, 2025 · 3 comments
Open
3 tasks done

Comments

@landenai
Copy link

landenai commented Apr 1, 2025

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

9.10.1

Framework Version

Next 15.0.1

Link to Sentry event

https://demo.sentry.io/discover/trace/f1eebb3564204653b318bf254d6bedfa/?dataset=transactions&field=title&field=project&field=user.display&field=timestamp&name=All%20Errors&node=txn-ab4a4d9e58844679b25971740d7a78e0&project=4508968158429184&query=&queryDataset=transaction-like&sort=-timestamp&source=discover&statsPeriod=7d&timestamp=1743522159&yAxis=count%28%29

Reproduction Example/SDK Setup

With nodeProfilingIntegration is enabled in the Next.js SDK, we don't get all the server spans that we do when it is disabled. Additionally there aren't any profiles coming in from the SDK. This behavior is only observed on Vercel, localhost works as expected. (Link to how the above trace should look)

Steps to Reproduce

  1. Load product page
  2. Go to Pageload transaction in Sentry

Expected Result

Trace has all server spans and profiles attached

Actual Result

Trace does not have all server spans and no profiles attached

@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Apr 1, 2025
@landenai landenai changed the title nodeProfilingIntegration Preventing Server Spans on Vercel nodeProfilingIntegration Preventing Server Spans and Profiles on Vercel Apr 1, 2025
@landenai landenai changed the title nodeProfilingIntegration Preventing Server Spans and Profiles on Vercel No Server Spans or Profiles when using nodeProfilingIntegration on Vercel Apr 1, 2025
@Lms24
Copy link
Member

Lms24 commented Apr 2, 2025

Thx for filing @landenai!

It seems like db spans are missing in the trace with profiling. Which makes me think that the Otel postgres instrumentation isn't patching as expected. Do we have debug logs from the vercel deploy? We can confirm that otel doesn't patch this if we don't find any debug logs around it.

Shot in the dark: This might be related to us detecting ESM vs CJS incorrectly. Again, debug logs can help us out here as we emit a "Running in ESM|CommonJS mode" log after our detection attempt (also worth noting, there's a pending bugfix via #15927).

Last question: when removing nodeProfilingIntegration and deploying to vercel, do we get db spans again?

@rchasman
Copy link

I've never gotten db spans with this exact setup and thought it was just a next/sentry limitation. I thought if we wanted spans we would have to instrument them manually.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Apr 10, 2025
@Lms24
Copy link
Member

Lms24 commented Apr 11, 2025

Hey @rchasman it depends a bit on which library you're using (we have auto instrumentation for pg, mysql, mysql2, ioredis, redis and Prisma). Here's a full overview

To debug this, can you help us out with debug logs I asked for above? Also, would appreciate a minimal reproduction on the latest SDK version. Thanks!

@Lms24 Lms24 added Waiting for: Community and removed Package: nextjs Issues related to the Sentry Nextjs SDK Bug labels Apr 11, 2025
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

4 participants