File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/node/src/integrations/tracing/langgraph Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -62,16 +62,26 @@ export class SentryLangGraphInstrumentation extends InstrumentationBase<LangGrap
6262 this . _patch . bind ( this ) ,
6363 exports => exports ,
6464 ) ,
65+ new InstrumentationNodeModuleFile (
66+ /**
67+ * ESM builds use dist/prebuilt/index.js (without .cjs extension)
68+ * This catches ESM imports that resolve through the main package
69+ */
70+ '@langchain/langgraph/dist/prebuilt/index.js' ,
71+ supportedVersions ,
72+ this . _patch . bind ( this ) ,
73+ exports => exports ,
74+ ) ,
6575 ] ,
6676 ) ;
77+
6778 return module ;
6879 }
6980
7081 /**
7182 * Core patch logic applying instrumentation to the LangGraph module.
7283 */
7384 private _patch ( exports : PatchedModuleExports ) : PatchedModuleExports | void {
74- console . log ( 'patching LangGraph module' ) ;
7585 const client = getClient ( ) ;
7686 const defaultPii = Boolean ( client ?. getOptions ( ) . sendDefaultPii ) ;
7787
You can’t perform that action at this time.
0 commit comments