withSpanSync()
function withSpanSync\<T\>(
name: string,
fn: (span: Span) => T,
attributes?: Attributes): T;
Defined in: src/lib/logging/context.ts:344
Synchronous version of withSpan for non-async operations.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Name for the span. |
fn | (span: Span) => T | Function to execute within the span. |
attributes? | Attributes | Optional attributes for the span. |
Returns
T
The result of the function.