use of com.navercorp.pinpoint.bootstrap.plugin.ApplicationTypeDetector in project pinpoint by naver.
the class ApplicationServerTypeProvider method get.
@Override
public ServiceType get() {
final ServiceType applicationServiceType = getApplicationServiceType();
logger.info("default ApplicationServerType={}", applicationServiceType);
PluginContextLoadResult pluginContextLoadResult = this.pluginContextLoadResultProvider.get();
List<ApplicationTypeDetector> applicationTypeDetectorList = pluginContextLoadResult.getApplicationTypeDetectorList();
ApplicationServerTypeResolver applicationServerTypeResolver = new ApplicationServerTypeResolver(applicationTypeDetectorList, applicationServiceType, profilerConfig.getApplicationTypeDetectOrder());
ServiceType resolve = applicationServerTypeResolver.resolve();
logger.info("resolved ApplicationServerType={}", resolve);
return resolve;
}
use of com.navercorp.pinpoint.bootstrap.plugin.ApplicationTypeDetector in project pinpoint by naver.
the class ApplicationServerTypePluginResolver method resolve.
public ServiceType resolve() {
for (ApplicationTypeDetector currentDetector : this.applicationTypeDetectors) {
String currentDetectorName = currentDetector.getClass().getName();
logger.info("Attempting to resolve using [{}]", currentDetectorName);
if (currentDetector.detect(this.conditionProvider)) {
logger.info("Match found using [{}]", currentDetectorName);
return currentDetector.getApplicationType();
} else {
logger.info("No match found using [{}]", currentDetectorName);
}
}
logger.debug("Server type not resolved. Defaulting to {}", DEFAULT_SERVER_TYPE.getName());
return DEFAULT_SERVER_TYPE;
}
Aggregations