Skip to content

Instrument SvelteKit Form Actions #16323

Open
@Lms24

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions