Skip to content

Commit 0c1e91d

Browse files
committed
Revert "fix: setTraceAttributes cross trace attributes leakage issue (#200)"
This reverts commit 7038775.
1 parent f3ccd9b commit 0c1e91d

File tree

2 files changed

+2
-153
lines changed

2 files changed

+2
-153
lines changed

packages/node-opentelemetry/src/MutableAsyncLocalStorageContextManager.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ export class MutableAsyncLocalStorageContextManager extends AbstractAsyncHooksCo
4444
thisArg?: ThisParameterType<F>,
4545
...args: A
4646
): ReturnType<F> {
47-
// Create a fresh mutableContext for each new context to prevent
48-
// cross-contamination between concurrent requests
49-
const mutableContext = {
47+
const mutableContext = this._asyncLocalStorage.getStore()
48+
?.mutableContext ?? {
5049
traceAttributes: new Map(),
5150
};
5251

packages/node-opentelemetry/src/__tests__/setTraceAttributes.test.ts

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)