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

    Interface Trace

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

    Properties

    Methods

    Properties

    id: string

    This trace ID.

    trace: Readonly<DTrace>

    This trace.

    Methods

    • Records an error in the current span.

      Parameters

      • error: BSBError<any> | Error

        The error to record

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

        Optional attributes to associate with the span

      Returns void

    • Ends the current trace or span. If the trace was created, then it will end both. However if it references an existing trace, then it will only end the span.

      Parameters

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

        Optional attributes to associate with the trace

      Returns void