sofa-tracer icon indicating copy to clipboard operation
sofa-tracer copied to clipboard

any plan to integrate spring scheduled

Open davis1214 opened this issue 4 years ago • 1 comments

is there any plan to integrate spring scheduled

davis1214 avatar Jun 09 '20 10:06 davis1214

Spring Scheduled?
Maybe you can customize your thread pool,rewrite the execute method, wrap Runnable into SofaTracerRunnable。

public class XxxThreadPoolTaskExecutor extends ThreadPoolTaskExecutor {
        @Override
        public void execute(Runnable runnable) {
            super.execute(new SofaTracerRunnable(runnable));
        }
    }

end: replace the thread pool that comes with Spring。

chenmudu avatar Jul 08 '20 15:07 chenmudu