Repository navigation
fix(sveltekit): add op and origin to Kit's sveltekit.endpoint span - #25376
Merged
Merged
Conversation
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>
isaacs
requested review from
chargome and
s1gr1d
and removed request for
a team
October 15, 2026 00:10
isaacs
enabled auto-merge (squash)
October 15, 2026 00:22
51 tasks done
nicohrubec
pushed a commit
that referenced
this pull request
Oct 16, 2026
…pan (#25429) Backport of: #25376 ## Differences to the original PR - `packages/sveltekit/src/server-common/integrations/svelteKitSpans.ts`: v10's span mapping returns `{ op, origin }` instead of only an origin, so the endpoint case returns `{ op: 'function.sveltekit.endpoint', origin: 'auto.function.sveltekit.endpoint' }`. Unit and e2e test expectations were adjusted to match. This branch was prepared by the v10 backport automation, which was blocked at PR creation; it's opened manually now. <!-- junior-request-attribution:start --> via **Jan Peer Stöcklmair**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A83fc948beed4fb12a54d41cb --> -- [View Junior Session in Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A83fc948beed4fb12a54d41cb/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Jan Peer 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.
SvelteKit 3.1.0 emits a
sveltekit.endpointspan for+serverhandlers when server tracing is on. The SDK did not know the span, so it went out with originmanualand no op, unlike Kit's other spans. It also broke thesveltekit-3e2e test, which counts the child spans of a page that fetches a+serverroute.The span now gets op
functionand originauto.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 ownwrapServerRouteWithSentryspan (auto.function.sveltekit), which can now appear next to it. Under span streaming, the span also getssentry.description, as Kit's other spans do, because thefunctiondescription template needscode.function.name, which Kit does not set.Re: sveltejs/kit#17325