Repository navigation
Commit eb60783
fix(solidstart): Read server action route from the request's root span (#25513)
This fixes the `E2E solidstart-2` failure on `develop`. Since #25295,
the "sends a server action span on client navigation" test times out
because the `POST getPrefecture` segment is never sent.
_Root cause:_ After #25295, Nitro's h3 route handler opens a `handler`
span instead of a nested `http.server` span.
`withServerActionInstrumentation` decided whether to rename the segment
by reading the attributes of the *active* span. Now that span is the
`handler` span, which has no `url.path`, so the `/_server` check never
matched and the server action name was never applied.
The fix reads the attributes from the root span instead. That is the
request's `http.server` span, the one `setHttpServerSpanRouteAttribute`
renames, so the check and the rename now target the same span whatever
the framework nests in between.
Locally, `solidstart-2` E2E fails 1/9 (this test) without the change and
passes 9/9 with it.
<!-- junior-request-attribution:start -->
via **Francesco Gringl-Novy**.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!--
junior-conversation-id:agent-dispatch%3Adispatch_6234d76cd131dcc5f1925dab1ce334ad
-->
--
[View Junior
Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_6234d76cd131dcc5f1925dab1ce334ad)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_6234d76cd131dcc5f1925dab1ce334ad/?project=4510944073809921)
<!-- junior-session-footer:end -->
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>1 parent b151d07 commit eb60783
2 files changed
Lines changed: 26 additions & 2 deletions
File tree
- packages/solidstart
- src/server
- test/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
172 | 194 | | |
173 | 195 | | |
174 | 196 | | |
| |||
0 commit comments