Skip to content

Instrument SvelteKit Form Actions #16323

Closed as not planned
Closed as not planned

Description

@Lms24

Problem Statement

Today, we don't provide an easy wrapper to start spans for sveltekit form actions. Therefore, users would have to manually wrap spans around their actions which can become quite verbose and tedious.

Solution Brainstorm

We should add instrumentation for this in two steps:

  1. Export a wrapper that users can call manually (analogously to our server route helper)
  2. Auto-wrap the actions export, just like we do it with load functions

Instrumentation should essentially wrap the actions object, for both named as well as default actions.

Things to consider:

  • start span (probably with op function.sveltekit.action.(default|<name>) but concrete naming tbd
  • can we attach the return value?
  • users can redirect -- our wrapper needs to rethrow this (should work by default, just mentioning it)

Activity

  1. added theissue type on May 19, 2025
  2. Lms24 commented on Feb 11, 2026

    @Lms24
    MemberAuthor

    Going to close this as "Wont do" because with Kit-native tracing I want to avoid build-time wrapping. Actions are already traced by kit itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions