Share via


SpanDetails interface

Span configuration details for scope creation. Groups OpenTelemetry span options into a single object so the scope method signature remains stable as new options are added.

Properties

endTime

Optional explicit end time (ms epoch, Date, or HrTime).

parentContext

Optional parent context for cross-async-boundary tracing. Accepts a ParentSpanRef (manual traceId/spanId) or an OTel Context (e.g. from extractContextFromHeaders).

spanKind

Optional span kind override.

spanLinks

Optional span links to associate with this span.

startTime

Optional explicit start time (ms epoch, Date, or HrTime).

Property Details

endTime

Optional explicit end time (ms epoch, Date, or HrTime).

endTime?: TimeInput

Property Value

TimeInput

parentContext

Optional parent context for cross-async-boundary tracing. Accepts a ParentSpanRef (manual traceId/spanId) or an OTel Context (e.g. from extractContextFromHeaders).

parentContext?: ParentContext

Property Value

spanKind

Optional span kind override.

spanKind?: SpanKind

Property Value

SpanKind

Optional span links to associate with this span.

spanLinks?: Link[]

Property Value

Link[]

startTime

Optional explicit start time (ms epoch, Date, or HrTime).

startTime?: TimeInput

Property Value

TimeInput