OpenInference JS
    Preparing search index...

    Variable enrichSpanWithOpenInferenceConst

    enrichSpanWithOpenInference: EnrichSpan = ...

    Provides OpenInference attributes when @ai-sdk/otel creates a span.

    Pass this callback as OpenTelemetry's enrichSpan option alongside an OpenInference span processor. It uses the SDK's span type and operation ID when the emitted GenAI attributes do not distinguish the span's role. For decision calls, it marks the outer operation as CHAIN and the model call as DECISION. Other spans are left to the processor's normal mapping.

    Requires ai 7.0.128 and @ai-sdk/otel 1.0.128 or later.

    registerTelemetry(
    new OpenTelemetry({ enrichSpan: enrichSpanWithOpenInference }),
    );