Skip to content

Handle SvelteKit data preloads #16322

Open
@Lms24

Description

@Lms24

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions