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
{{ message }}
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
Since node 20, custom loaders are executed separately from the rest of the application. The problem is that we use that loader to preload the entire agent. So every hooks placed by the agent has no effect on the observed application. Another minor implication is that process.argv inside the loader no longer contains the main path, it only contains the node executable.
To solve this issue we have to adopt the same architecture as for the jest recorder where the transformer is isolated. To preload the agent we have 2 strategies:
Use --import which supports esm modules but I'm not sure how backward compatible this is.
Use --require which is older but it requires to bundle the agent as a commonjs module which is not currently the case.
The text was updated successfully, but these errors were encountered:
Hooks are run in a separate thread, isolated from the main. That means it is a different realm. The hooks thread may be terminated by the main thread at any time, so do not depend on asynchronous operations (like console.log) to complete.
Since node 20, custom loaders are executed separately from the rest of the application. The problem is that we use that loader to preload the entire agent. So every hooks placed by the agent has no effect on the observed application. Another minor implication is that
process.argv
inside the loader no longer contains the main path, it only contains the node executable.To solve this issue we have to adopt the same architecture as for the jest recorder where the transformer is isolated. To preload the agent we have 2 strategies:
--import
which supports esm modules but I'm not sure how backward compatible this is.--require
which is older but it requires to bundle the agent as a commonjs module which is not currently the case.The text was updated successfully, but these errors were encountered: