Repository navigation
Commit 0ed4606
fix(sveltekit): add op and origin to Kit's
SvelteKit 3.1.0 emits a `sveltekit.endpoint` span for `+server` handlers
when server tracing is on. The SDK did not know the span, so it went out
with origin `manual` and no op, unlike Kit's other spans. It also broke
the `sveltekit-3` e2e test, which counts the child spans of a page that
fetches a `+server` route.
The span now gets op `function` and origin
`auto.function.sveltekit.endpoint`. The origin follows the trace origin
format and the other Kit span origins (`auto.function.sveltekit.load`,
`auto.function.sveltekit.action`). Its part keeps the span apart from
the SDK's own `wrapServerRouteWithSentry` span
(`auto.function.sveltekit`), which can now appear next to it. Under span
streaming, the span also gets `sentry.description`, as Kit's other spans
do, because the `function` description template needs
`code.function.name`, which Kit does not set.
Re: sveltejs/kit#17325
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>sveltekit.endpoint span (#25376)1 parent 9516aeb commit 0ed4606
3 files changed
Lines changed: 18 additions & 1 deletion
File tree
- dev-packages/e2e-tests/test-applications/sveltekit-3/tests
- packages/sveltekit
- src/server-common/integrations
- test/server-common/integrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
105 | 118 | | |
106 | 119 | | |
107 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
0 commit comments