You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the recent release of Node v18.19.0, the dd-trace-js custom ESM loader is loading our application twice, causing it to fail with a port already bound error (this is an express application).
It appears the the v18.19.0 release added some breaking changes that would alter the way the dd-trace-js loader hook works. They indicate that v20 moves loaders to their own thread, which sounds like the culprit, but I'm unsure why that would affect v18. See
I have tried to switch to use the --import syntax, as outlined here, however, this still results in duplicate loading.
I am unsure whether this is a bug with Node v18.19.0, or if the breaking change is in fact correct and dd-trace-js loader hook needs to be updated to reflect the changes.
Expected behaviour
Loading dd-trace-js using the custom ESM loader node --loader=dd-trace/loader-hook.mjs properly starts our application, once.
Actual behaviour
Custom loader loads our application twice, which triggers a port conflict given that its trying to start two threads of the same application.
Steps to reproduce
Create a simple express app using ESM
Instrument with dd-trace-js custom loader
Run with Node v18.19.0
Environment
Operation system: node:18-alpine
Node.js version: v18.19.0
Tracer version: 4.20.0
Agent version:
Relevant library versions:
The text was updated successfully, but these errors were encountered:
With the recent release of Node v18.19.0, the dd-trace-js custom ESM loader is loading our application twice, causing it to fail with a port already bound error (this is an express application).
It appears the the v18.19.0 release added some breaking changes that would alter the way the dd-trace-js loader hook works. They indicate that v20 moves loaders to their own thread, which sounds like the culprit, but I'm unsure why that would affect v18. See
I have tried to switch to use the
--import
syntax, as outlined here, however, this still results in duplicate loading.I am unsure whether this is a bug with Node v18.19.0, or if the breaking change is in fact correct and dd-trace-js loader hook needs to be updated to reflect the changes.
Expected behaviour
Loading dd-trace-js using the custom ESM loader
node --loader=dd-trace/loader-hook.mjs
properly starts our application, once.Actual behaviour
Custom loader loads our application twice, which triggers a port conflict given that its trying to start two threads of the same application.
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: