@microsoft/opentelemetry
    Preparing search index...

    Class OpenTelemetryScopeAbstract

    Base class for OpenTelemetry tracing scopes.

    Subclasses: InvokeAgentScope, ExecuteToolScope, InferenceScope, OutputScope.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    span: Span

    Methods

    • Records multiple attribute key/value pairs.

      Parameters

      • attributes:
            | Iterable<[string, AttributeValue], any, any>
            | Record<string, AttributeValue>
            | null
            | undefined

      Returns void

    • Sets a custom end time for the scope. When set, dispose() will pass this value to span.end() instead of using wall-clock time.

      Parameters

      • endTime: TimeInput

      Returns void

    • Sets a tag on the span if the value is not null or undefined.

      Type Parameters

      • T extends string | number | boolean | string[] | number[]

      Parameters

      • name: string
      • value: T | null | undefined

      Returns void

    • Makes this span active for the duration of the async callback execution.

      Type Parameters

      • T

      Parameters

      • callback: () => Promise<T>

      Returns Promise<T>