> If you don't add a field, this class isn't `EnhancedInstance`. All > interceptors would not work.
> We will have a EnhancedInstance of Runnable that is the param of ThreadPoolExecutor#execute. You don't get my point. take a look at InstMethodsInter. It requires the EnhancedInstance as parameter. > The instrumentation target can be used as long as we don’t change the class structure,such as adding field, changing method signature. Do you have experience of doing this in the product env? It is very easy to cause a stop-world event. That is why we don't support re-transfer. Sheng Wu 吴晟 Twitter, wusheng1108 Li BingLong(智能平台) <[email protected]> 于2021年1月23日周六 下午5:43写道: > > Yes, this rule always exists. So, the instrumentation target can't be > used > > in the agent core booting stage. > > > The instrumentation target can be used as long as we don’t change the > class structure,such as adding field, changing method signature. > > > > If you don't add a field, this class isn't `EnhancedInstance`. All > > interceptors would not work. > > We will have a EnhancedInstance of Runnable that is the param of > ThreadPoolExecutor#execute. > > > > In my mind, I still don't like the idea of > > `ThreadPoolExecutor` instrumentation, it is really widely used, and > > manipulating it is a high-risk operation. > > It’s high-risk but less Invasive for user code.We can give the ability but > user choose to use it or not.
