Skip to content

withAgentSpan

const withAgentSpan: <TOutput>(fn, options?, parent?) => Promise<TOutput>;

Create a new agent span and automatically start and end it.

Type Parameter

TOutput

Parameter Type

fn

(span) => Promise<TOutput>

options?

DeepPartial<CreateSpanOptions<AgentSpanData>>

parent?

| Trace | Span<any>

Promise<TOutput>