Skip to main content
withAttributes<T>(attrs, fn): T | Promise<T>
Defined in: src/clientApi.ts:209 Attach attributes to the current execution context so that any calls created inside fn automatically inherit them. Attributes are written to the call record on the trace server and surface in the Weave UI/filtering, so they’re ideal for tagging runs with request IDs, tenants, experiments, etc. Example:

Type Parameters

T

T

Parameters

attrs

Record<string, any>

fn

() => T | Promise<T>

Returns

T | Promise<T>