Only the latest hook will get triggered
kjin opened this issue ยท 4 comments
kjin commented
I think this line is causing a second hook to override a first:
require-in-the-middle/index.js
Line 43 in fb286a9
watson commented
Ah yes, I think you're spot on. This is because Module.prototype.require
isn't overwritten in the same tick as when we're caching the original function.
If we just moved that into hook
function then I think it would all work as expected ๐
watson commented
This have now been fixed in v3.0.0
kjin commented
Thanks!
watson commented
This have now been released in elastic-apm-node v1.8.1 as well