UNPKG

@aws/aws-distro-opentelemetry-node-autoinstrumentation

Version:

This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.

29 lines 1.3 kB
import { Context } from '@opentelemetry/api'; import { ReadableSpan, Span, SpanProcessor } from '@opentelemetry/sdk-trace-base'; export declare class VercelAISpanProcessor implements SpanProcessor { private _spanIdToCounts; private static readonly ATTRIBUTE_MAP; private static readonly OPERATION_MAP; forceFlush(): Promise<void>; shutdown(): Promise<void>; onStart(_span: Span, _parentContext: Context): void; onEnd(span: ReadableSpan): void; /** * Determines if a span represents an agent invocation. Per OTel GenAI semantic conventions, * "[the] combination of reasoning, logic, and access to external information that are all * connected to a Generative AI model invokes the concept of an agent." * See: https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-agent-spans/ * * We detect this if the LLM used any tools or made more than one LLM call. */ private isAgentSpan; private static formatInputMessages; private static formatOutputMessages; private static formatToolDefinitions; private static createSpanName; private static mapFinishReason; private static mapProviderName; private static inferOutputType; private static unwrapJsonString; } //# sourceMappingURL=span-processor.d.ts.map