pinpoint-apm / pinpoint

APM, (Application Performance Management) tool for large-scale distributed systems.
https://pinpoint-apm.gitbook.io/
Apache License 2.0
13.42k stars 3.76k forks source link

SpringBeanPlugin NOT Work When load spring bean class before Spring Scan. #7344

Open zhuyixiang opened 4 years ago

zhuyixiang commented 4 years ago

In My Application, for some reason, we load the spring bean class before spring package scan. The pinpoint agent and spring plugin will not enhance it, so the of Spring Bean's span was missing.

emeroad commented 4 years ago

Please provide a reproduction case in the agent-testweb.

zhuyixiang commented 4 years ago

No need example。 spring boot main code like this。

public static void main(String[] args) {
    System.out.println(TestController.class.getName());
    System.out.println(TestService.class.getName());
    SpringApplication.run(DemoApplicationB.class, args);
}

then the Controler and Service will not be track by pinpoint

zhuyixiang commented 4 years ago

Please provide a reproduction case in the agent-testweb.

No need example。 spring boot main code like this。

public static void main(String[] args) { System.out.println(TestController.class.getName()); System.out.println(TestService.class.getName()); SpringApplication.run(DemoApplicationB.class, args); } then the Controler and Service will not be track by pinpoint