import { InstrumentationBase, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation'; import { InstrumentationConfig } from '@opentelemetry/instrumentation'; export interface LangChainInstrumentationConfig extends InstrumentationConfig { } export default class OpenlitLangChainInstrumentation extends InstrumentationBase { private _callbackManager; private _ritmHook; constructor(config?: LangChainInstrumentationConfig); protected init(): void | InstrumentationModuleDefinition | InstrumentationModuleDefinition[]; /** Override enable() to install a direct RITM Hook rather than going through the singleton. */ enable(): void; /** Override disable() to remove our direct RITM Hook. */ disable(): void; /** Called from tests / manual usage — pass the @langchain/core/callbacks/manager exports. */ manualPatch(callbacksManagerModule: any): void; /** * Scan require.cache for @langchain/core's dist/callbacks/manager.cjs. * It is always loaded as a relative dep before the chat_models hook fires. */ private _patchFromCache; private _applyPatch; private _unpatch; }