Skip to content

createFunctionSpan

function createFunctionSpan(options, parent?): Span<FunctionSpanData>

Create a new function span. The span will not be started automatically, you should either use withFunctionSpan() or call span.start() and span.end() manually.

Parameter Type Description

options

DeepPartial<CreateSpanOptions<FunctionSpanData>> & object

Optional span creation options, including span data and identifiers.

parent?

| Span<any> | Trace

The parent span or trace. If not provided, the current trace/span will be used automatically.

Span<FunctionSpanData>

The newly created function span.