Skip to content

Commit 93ee627

Browse files
committed
Add empty sub to fix node 18 addBind
1 parent 236cb24 commit 93ee627

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/dd-trace/src/appsec/rasp/fs-plugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class AppsecFsPlugin extends Plugin {
3535
this.addBind('apm:fs:operation:finish', this._onFsOperationFinishOrRenderEnd)
3636
this.addBind('tracing:datadog:express:response:render:start', this._onResponseRenderStart)
3737
this.addBind('tracing:datadog:express:response:render:end', this._onFsOperationFinishOrRenderEnd)
38+
// TODO Remove this when dc-polyfill is fixed&updated
39+
// hack to node 18 and early 20.x
40+
// with dc-polyfill addBind is not enough to force a channel.hasSubscribers === true
41+
this.addSub('tracing:datadog:express:response:render:start', () => {})
3842

3943
super.configure(true)
4044
}

0 commit comments

Comments
 (0)