-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
9.6.1
Framework Version
Next 15.2.3
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/jessetan/sentry-propagation
Steps to Reproduce
After setting up Sentry in a Next JS application, any Sentry activity in client-side code does not seem to be linked to server-side code even though traces should be propagated between client and server.
The example repo shows a client-side rendered page that has two buttons. When a button is pressed, it adds a Sentry breadcrumb, and calls a server-side API.
The API adds a breadcrumb and captures a Sentry message server side.
When the fetch returns, the client-side captures a Sentry message.
Tangential to this report:
Trace information is propagated to the server side by adding the browserTracingIntegration, but this is not added by the Sentry wizard by default
Expected Result
When the messages are sent to Sentry from the server, or when there is no message but the trace is sampled (from trace sample rate or by propagating he client-initiated span), the span/trace ids are used to link these to the span from the client side.
This should create two issues in Sentry per button click, potentially merged together as one, where the breadcrumb trail and messages of both client and server side are present.
This would help debug issues that surface in the client-side, by attaching information about what happens on the server.
Actual Result
Two separate issues are created in Sentry. The breadcrumbs from the client-side message do not include any server-side information and vice versa.
Metadata
Metadata
Assignees
Labels
Projects
Status