Skip to content
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

Working with Next.js RSC Error digests #9474

Closed
Tracked by #9619
stephanie-anderson opened this issue Nov 7, 2023 · 4 comments
Closed
Tracked by #9619

Working with Next.js RSC Error digests #9474

stephanie-anderson opened this issue Nov 7, 2023 · 4 comments
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement

Comments

@stephanie-anderson
Copy link
Contributor

Image

@lforst
Copy link
Member

lforst commented Nov 7, 2023

This needs upstream changes from React so we can work with it:

  • Let us pass a custom digest or error ID of some sort that is propagated to the client.
  • Let us determine the digest for an error on the server directly.

A sort-of workaround for this is proper distributed tracing which let's people approximate what errors correlate.

@lforst lforst added Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement labels Nov 7, 2023
@stephanie-anderson stephanie-anderson changed the title Working with digest IDs Hydration errors / working with digest IDs Nov 15, 2023
@stephanie-anderson stephanie-anderson changed the title Hydration errors / working with digest IDs Working with digest IDs Nov 15, 2023
@lforst lforst changed the title Working with digest IDs Working with Next.js RSC Error digests Nov 15, 2023
@lforst lforst self-assigned this Nov 15, 2023
@steebchen

This comment was marked as off-topic.

@lforst
Copy link
Member

lforst commented May 6, 2024

@steebchen No this issue is about being able to correlate Client errors caused by Server Component errors. My PR to Next.js should make this a bit easier at least: vercel/next.js#64256

If the SDK is not collecting backend errors for you, please open a new issue with reproduction steps. Thank you!

@lforst
Copy link
Member

lforst commented May 27, 2024

This is partially resolved by #12157 which will let you correlate client errors with their respective server component errors. I guess this is even better than the digest because the digest is a 1:1 mapping from client error to server error while technically the server could generate multiple errors.

I will close this issue to clean up our issue stream but we are in talks with the Vercel team to add an API to Next.js which would allow for the recording of the RSC Error digest on the server. This would likely come in the form of an onError hook in instrumentation.ts or similar.

@lforst lforst closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement
Projects
Archived in project
Development

No branches or pull requests

3 participants