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

Continue traces for Next.js 13 server components #7179

Closed
Tracked by #6726
lforst opened this issue Feb 14, 2023 · 0 comments · Fixed by #7320
Closed
Tracked by #6726

Continue traces for Next.js 13 server components #7179

lforst opened this issue Feb 14, 2023 · 0 comments · Fixed by #7320
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement

Comments

@lforst
Copy link
Member

lforst commented Feb 14, 2023

Problem Statement

If a client requests a server component we would like to continue traces if there was an active transaction.

Solution Brainstorm

Get headers via headers() in server component and just continue the trace. Builds on #7176

Right now there is a complication though. Next.js uses AsyncLocalStorage to propagate headers without having to explicitly pass them around and up until now I have found no way to call headers() from within a wrapper without running into some issue with AsyncLocalStorage.

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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant