@microsoft/opentelemetry
    Preparing search index...

    Class ApplyGuardrailScope

    Provides OpenTelemetry tracing scope for security guardrail evaluation operations.

    Describes a security guardian evaluation. Multiple guardian spans MAY exist under a single operation span if multiple guardians are chained.

    Guardian spans SHOULD be children of the operation span they are protecting (e.g., inference or execute_tool spans).

    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 output content value for the guardrail evaluation (opt-in).

      Parameters

      • outputValue: string

        The output content after guardrail processing.

      Returns void

    • Records an updated decision on the guardrail span. Use this when the guardrail decision is determined after span creation.

      Parameters

      • decisionType: GuardrailDecisionType

        The decision type made by the guardian.

      • Optionalreason: string

        Optional human-readable explanation for the decision.

      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