@microsoft/opentelemetry
    Preparing search index...

    Class InferenceScope

    Provides OpenTelemetry tracing scope for generative AI inference operations.

    Hierarchy (View Summary)

    Index

    Properties

    span: Span

    Methods

    • Records multiple attribute key/value pairs.

      Parameters

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

      Returns void

    • Records the finish reasons.

      Parameters

      • finishReasons: string[]

      Returns void

    • Records the number of input tokens.

      Parameters

      • inputTokens: number

      Returns void

    • Records the number of output tokens.

      Parameters

      • outputTokens: number

      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