Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.37.1
Framework Version
Next 15.0.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
We're using Sentry on both the client and server side of our Next.js Demo app. We have a products page that uses a server component to fetch product data from the db. We are hosting on Vercel. Note that the expected result is observed locally but not in Vercel
Steps to Reproduce
- Load product page
- Go to Pageload transaction in Sentry
Expected Result
The pageload transaction contains server spans including the DB operations
Actual Result
When first loading this page, the pageload transaction in Sentry has client spans only (incorrect). If you then refresh the page, the server spans are takend from the second pageload transaction and applied to the original. You can prove this by opening the pageload transaction after the first page load and observing only client spans. Then refresh the products page, wait a moment, and then refresh the original pageload transaction. You will now see the server spans as part of that transaction! Observe the new pageload transaction, and you will see only server spans.
Metadata
Metadata
Assignees
Type
Projects
Status