Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed May 29, 2024
1 parent 99d196b commit aed5c61
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions langchain-core/src/singletons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ const mockAsyncLocalStorage = new MockAsyncLocalStorage();

class AsyncLocalStorageProvider {
getInstance(): AsyncLocalStorageInterface {
return (globalThis as any).__lc_async_local_storage ?? mockAsyncLocalStorage;
return (
(globalThis as any).__lc_tracing_async_local_storage ??
mockAsyncLocalStorage
);
}

initializeGlobalInstance(instance: AsyncLocalStorageInterface) {
if ((globalThis as any).__lc_async_local_storage === undefined) {
(globalThis as any).__lc_async_local_storage = instance;
if ((globalThis as any).__lc_tracing_async_local_storage === undefined) {
(globalThis as any).__lc_tracing_async_local_storage = instance;
}
}
}
Expand Down

0 comments on commit aed5c61

Please sign in to comment.