BSB Node.js Type Definitions
    Preparing search index...

    Interface Span

    interface Span {
        id: string;
        trace: Readonly<DTrace>;
        end(attributes?: Record<string, string | number | boolean>): void;
        error(
            error: BSBError<any> | Error,
            attributes?: Record<string, string | number | boolean>,
        ): void;
    }
    Index

    Properties

    Methods

    Properties

    id: string

    This span ID.

    trace: Readonly<DTrace>

    This dTrace reference.

    Methods

    • Ends the current span.

      Parameters

      • Optionalattributes: Record<string, string | number | boolean>

        Optional attributes to associate with the span

      Returns void

    • Records an error in the current span.

      Parameters

      • error: BSBError<any> | Error

        The error to record

      • Optionalattributes: Record<string, string | number | boolean>

        Optional labels to associate with the span

      Returns void