Options needed for span creation

interface SugaredSpanOptions {
    attributes?: Attributes;
    kind?: SpanKind;
    links?: Link[];
    onException?: (e: Error, span: Span) => void;
    root?: boolean;
    startTime?: TimeInput;
}

Hierarchy (View Summary)

Properties

attributes?: Attributes

A span's attributes

kind?: SpanKind

The SpanKind of a span

links?: Link[]

Links span to other spans

onException?: (e: Error, span: Span) => void

function to overwrite default exception behavior to record the exception. No exceptions should be thrown in the function.

Type declaration

    • (e: Error, span: Span): void
    • Parameters

      • e: Error

        Error which triggered this exception

      • span: Span

        current span from context

      Returns void

root?: boolean

The new span should be a root span. (Ignore parent from context).

startTime?: TimeInput

A manually specified start time for the created Span object.