Anaconda OpenTelemetry for Typescript
    Preparing search index...

    Interface ASpan

    Represents a span in a tracing system, providing methods to record events, exceptions, errors, and attributes.

    This interface is typically used to instrument code for distributed tracing, allowing you to annotate spans with additional information.

    interface ASpan {
        addAttributes(attributes: AttrMap): void;
        addEvent(name: string, attributes?: AttrMap): void;
        addException(exception: Error): void;
        setErrorStatus(msg?: string): void;
    }
    Index

    Methods

    • Adds the specified attributes to the current object.

      Parameters

      • attributes: AttrMap

        A record containing key-value pairs of attributes to add.

      Returns void

    • Adds an event with the specified name and optional attributes.

      Parameters

      • name: string

        The name of the event to add.

      • Optionalattributes: AttrMap

        Optional key-value pairs providing additional information about the event.

      Returns void

    • Adds an exception to the current context.

      Parameters

      • exception: Error

        The error object to be added as an exception.

      Returns void

    • Sets the error status for the current signal.

      Parameters

      • Optionalmsg: string

        Optional error message describing the reason for the error status.

      Returns void