Repository navigation
fix(solidstart): Name server action requests from the root span - #25558
Closed
sentry-junior[bot] wants to merge 1 commit into
Closed
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
The Nitro integration now opens a child handler span for each route, so the active span inside a server function no longer carries `url.path`. Read the request attributes from the root `http.server` span instead so `/_server` requests are named after the server action again. Co-Authored-By: Jan VamPeer Stöcklmair <jan.peer@sentry.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
solidstart-2E2E job isn't flaky. It has failed every time it has run ondevelopsince Oct 19, always onsends a server action span on client navigation. Nobody caught it because the job is optional.Root cause: since #25295, the Nitro integration opens a
handlerchild span (POST /**) for every route under the request'shttp.serverroot span. Inside a server function, that handler span is now the active span.withServerActionInstrumentationwas readingurl.pathfrom the active span, buturl.pathonly lives on the root span. So the/_servercheck never matched, and the request kept the barePOSTsegment name (span streaming drops the URL) instead of becomingPOST getPrefecture.The fix reads the request attributes from the root span, which is what
setHttpServerSpanRouteAttributealready updates. On SolidStart 1 (vinxi) the active span already is the root, so nothing changes there.via Jan Peer Stöcklmair.
--
View Junior Session [Sentry]