Open
Description
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:
- Export a wrapper that users can call manually (analogously to our server route helper)
- 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)