-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Fix cardinality of opentelemetry span names on client-side navigation #59282
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
1 similar comment
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Failing test suitesCommit: 697f99e
Expand output● app-dir-hmr › filesystem changes › should not break when renaming a folder
Read more about building and testing Next.js in contributing.md.
Expand output● opentelemetry › root context › app router › should handle client-side navigation
● opentelemetry › incoming context propagation › app router › should handle client-side navigation
Read more about building and testing Next.js in contributing.md. |
I can't retrieve the logs of why the pipeline failed. Seems there is a timeout. Do you think it comes from my update ? |
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
Diff detailsDiff for page.jsDiff too large to display Diff for app-page-exp..ntime.dev.jsDiff too large to display Diff for app-page-exp..time.prod.jsDiff too large to display Diff for app-page-tur..time.prod.jsDiff too large to display Diff for app-page-tur..time.prod.jsDiff too large to display Diff for app-page.runtime.dev.jsDiff too large to display Diff for app-page.runtime.prod.jsDiff too large to display |
@Leonils are you not able to click on the logs from the CI? let me know if I need to copy them. Seems some of the PPR tests are not passing |
On this run I do. I'm investigating. |
👋 any update on when this PR will get merged? it's preventing us from adopting OTEL. |
4 failing tests / checks are presumably the reason why this can't be merged yet. However when opening those 4, they all display
Can anyone with sufficient permissions rerun / re-trigger those tests? I'd like to help out & see what might be causing them to fail |
@Leonils I will be closing this |
Pull request was closed
@samcx there was no path to merging this because nobody was able to view how / why the tests were failing - that's why I asked on March 19th if anyone can re-trigger the tests so we can collectively investigate. |
What?
As noticed in issue #54694, span names for dynamic routes are not consistent and sometimes miss the "next.route" attribute, and have a span name that have the parameters instead of the capturing placeholders.
Fixing a bug or a limitation
test/e2e/opentelemetry
test suite)test/e2e/opentelemetry
app used to test telemetry (some pages with link between them where created but not quite correct in the links, and were not handling the defined params)Limits
This PR identify a case where some traces are wrong (see bellow for the detailed identified case). But there might be others that the other of #54694 might think of.
How
Function
renderToHTMLOrFlightImpl
is the one responsible for rendering of the page. It is also the one that set thenext.route
attribute, the one that has the interpreted route instead of the full url. However, there is a shortcut to exit the function beforenext.route
is set when the conditionisRSCRequest && !isStaticGeneration
is met. I think we can setnext.route
before, so in any case the route has the correct value.Added test
The added test go to page
/app/foo/loading/page1
, then click to the<Link/>
to/app/[param]/loading/page2
. The diff between the expected traces and the ones we get without the fix are:We see the first load of page1 that has the correct name, but the next render, fetched from client do not.