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

feat(nextjs): Connect traces for server components #7320

Merged
merged 7 commits into from Mar 7, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Mar 2, 2023

Fixes #7179

This PR adds connected traces to server components. One thing we have to be careful of is not to call headers() during the build-phase, otherwise, Next.js will mark the wrapped server component as dynamic which will have a drastic performance impact for the user.

Also, this PR adds some code to our E2E tests so we can assert on build output. In this case we wanna assert that static components stay static and dynamic ones dynamic.

@lforst lforst assigned lforst and unassigned lforst Mar 2, 2023
@lforst lforst marked this pull request as ready for review March 6, 2023 16:45
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would appreciate a screenshot in the PR!

@lforst
Copy link
Member Author

lforst commented Mar 7, 2023

Would appreciate a screenshot in the PR!

@AbhiPrasad one for the history books:

Screenshot 2023-03-07 at 17 11 26

Screenshot 2023-03-07 at 17 12 02

@lforst lforst merged commit 0e09695 into develop Mar 7, 2023
@lforst lforst deleted the lforst-connected-traces-servercomponents branch March 7, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Continue traces for Next.js 13 server components
2 participants