tom-pytel edited a comment on issue #6109:
URL: https://github.com/apache/skywalking/issues/6109#issuecomment-752722626


   One other change I am not certain about, the change from plugin `require()` 
using the form `PluginInstaller.require('axios').default` to 
`require('axios').default`. The `PluginInstaller.require()` function is 
specifically set to run in the context of the top-level module. I did this 
because I had a test case (don't remember details exactly) where the skywalking 
plugin could not "see" a module the main app was using through its `require()` 
function and its dir search tree, which led to the module not being 
instrumented since skywalking could not `require()` it from where it was. So I 
added this function so that skywalking can `require()` in the same exact way 
the main module does and sees everything that it does.
   
   There is also the possibility when using skywalking via. `npm link` that it 
may have its own different version / instance of a module compared to the main 
executing application (which again would wind up not instrumenting the modules 
the main app is using).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to