Skip to content

Commit b43978b

Browse files
authored
update async scope tracking to not track itself (#773)
1 parent b74edde commit b43978b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/dd-trace/src/scope/async_hooks.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ class Scope extends Base {
7676
_await (span) {
7777
if (!this._promises[this._depth]) return
7878

79+
this._enabled = false
7980
this._awaitAsync(span)
81+
this._enabled = true
8082
}
8183

8284
// https://github.com/nodejs/node/issues/22360
@@ -91,10 +93,8 @@ class Scope extends Base {
9193

9294
_initPromise () {
9395
if (!this._promises[this._depth]) {
94-
this._enabled = false
9596
this._promises[this._depth] = true
9697
this._await(this._current)
97-
this._enabled = true
9898
}
9999
}
100100

0 commit comments

Comments
 (0)