Skip to content

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

Merged
lforst merged 7 commits intodevelopfrom
lforst-connected-traces-servercomponents
Mar 7, 2023
Merged

feat(nextjs): Connect traces for server components#7320
lforst merged 7 commits intodevelopfrom
lforst-connected-traces-servercomponents

Conversation

@lforst
Copy link
Copy Markdown
Contributor

@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
@lforst lforst requested review from AbhiPrasad, Lms24 and mydea March 6, 2023 16:46
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor 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