UNPKG

openlit

Version:

OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects

24 lines (23 loc) 1.01 kB
/** * OpenLIT LlamaIndex Wrapper * * Mirrors Python SDK: sdk/python/src/openlit/instrumentation/llamaindex/ * Uses the same OPERATION_MAP and span semantics as the Python implementation. * * LLM operations get full provider-style telemetry (attributes, events, metrics). * Framework operations (query engine, retriever, index, etc.) get framework-level spans. */ import { Tracer } from '@opentelemetry/api'; export default class LlamaIndexWrapper { static aiSystem: string; private static _extractModel; private static _extractServerInfo; static _patchLLMChat(tracer: Tracer): any; static _patchLLMComplete(tracer: Tracer): any; private static _processLLMResponse; static _patchQueryEngineQuery(tracer: Tracer): any; static _patchChatEngineChat(tracer: Tracer): any; static _patchRetrieverRetrieve(tracer: Tracer): any; static _patchEmbedding(tracer: Tracer, endpoint?: string): any; static _patchFrameworkMethod(tracer: Tracer, endpoint: string): any; }