CallbackManager._configureSync (or .configure) to inject a
FiddlerCallbackHandler into every invocation.
Node.js only — requires @langchain/core as a peer dependency and
uses node:async_hooks (via context) for context propagation.
Uses a WeakSet to track patched modules so frozen ESM exports
are handled correctly.
Methods
constructor(client: FiddlerClient)
An initialized FiddlerClient used by the
callback handler to create spans.
async instrument(): Promise<void>
Auto-instrument by dynamically importing
@langchain/core/callbacks/manager and patching its
CallbackManager.
isInstrumented(): boolean
Check whether the instrumentor has successfully patched a
CallbackManager module.
return
true if auto-instrumentation is active.manuallyInstrument(module: CallbackManagerModule)
Manually instrument a specific @langchain/core/callbacks/manager
module reference.
Use this in bundled environments (Webpack, esbuild, etc.) where
dynamic import() of @langchain/core may not resolve correctly.
The imported
@langchain/core/callbacks/manager module.uninstrument()
Remove the patch and restore the original CallbackManager behavior.
Safe to call even if the instrumentor was never activated.