Skip to content

Unable to see nextjs server breadcrumbs in client issues and vice versa #15784

@jessetan

Description

@jessetan

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.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

No one assigned

    Labels

    BugPackage: nextjsIssues related to the Sentry Nextjs SDK

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions