10000 Handle SvelteKit data preloads · Issue #16322 · getsentry/sentry-javascript · GitHub
[go: up one dir, main page]

Skip to content

Handle SvelteKit data preloads #16322

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

Open
Lms24 opened this issue May 19, 2025 · 0 comments
Open

Handle SvelteKit data preloads #16322

Lms24 opened this issue May 19, 2025 · 0 comments

Comments

@Lms24
Copy link
Member
Lms24 commented May 19, 2025

Description

SvelteKit provides strategies to preload data for another page when

  • [default] hovering over a link to a page
  • tapping/onotuchstart/onmousedown a link to a page

If any of these strategies are enabled (which they are by default), we miss the client-side http.client fetch spans, if the linked page has a server-only load function, because fetch spans are only started if there is a parent span.

The expected parent span would be the navigation span but this one does not exist because the kit router only starts the navigation when actually handling the link click.

Worth noting, we still propagate the trace to the backend, however, in this case the one of the current traceId. Which is probably fine because the really isn't an alternative.

We should ensure that we do start a fetch span for this preload.

Options:

  • start artificial parent span (if possible)
  • override onlyIfParent for this fetch request (if possible)
  • do nothing and wait for EAP/span streaming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0