useTrackedAction
useTrackedAction<
A,R>(name,fn,options?):TrackedAction<A,R>
Wrap an async action so its lifecycle is telemetered (plan 144 TASK-14 /
REQ-21). run emits ${name}_started, then ${name}_completed on success or
${name}_failed (with a non-sensitive error_category) on throw — and
preserves the return type and re-throws, so it is a drop-in wrapper. Events
inherit the enclosing TelemetryScope; a missing provider makes the
telemetry a no-op (AC-13) but never swallows the action.
Type Parameters
Section titled “Type Parameters”A extends unknown[]
R
Parameters
Section titled “Parameters”string
(…args) => R | Promise<R>
options?
Section titled “options?”Returns
Section titled “Returns”TrackedAction<A, R>