openlit
Version:
OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects
13 lines (12 loc) • 672 B
TypeScript
import { InstrumentationBase, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import OpenAI from 'openai';
export interface OpenAIInstrumentationConfig extends InstrumentationConfig {
}
export default class OpenlitOpenAIInstrumentation extends InstrumentationBase {
constructor(config?: OpenAIInstrumentationConfig);
protected init(): void | InstrumentationModuleDefinition | InstrumentationModuleDefinition[];
manualPatch(openai: any): void;
protected _patch(moduleExports: typeof OpenAI): void;
protected _unpatch(moduleExports: typeof OpenAI): void;
}