use of com.navercorp.pinpoint.bootstrap.context.ServerMetaDataHolder in project pinpoint by naver.
the class WebAppInterceptor method dispatchLibJars.
private void dispatchLibJars(String contextKey, List<String> libJars, ServletContext webapp) {
ServerMetaDataHolder holder = this.traceContext.getServerMetaDataHolder();
holder.addServiceInfo(contextKey, libJars);
holder.setServerName(webapp.getServerInfo());
holder.notifyListeners();
}
use of com.navercorp.pinpoint.bootstrap.context.ServerMetaDataHolder in project pinpoint by naver.
the class LauncherLaunchInterceptor method before.
@Override
public void before(Object target, Object[] args) {
if (isDebug) {
logger.beforeInterceptor(target, args);
}
if (!validate(target, args)) {
return;
}
String serviceName = createServiceName(target);
URLClassLoader classLoader = (URLClassLoader) args[2];
URL[] urls = classLoader.getURLs();
List<String> loadedJarNames = new ArrayList<String>(extractLibJarNamesFromURLs(urls));
ServerMetaDataHolder holder = this.traceContext.getServerMetaDataHolder();
holder.addServiceInfo(serviceName, loadedJarNames);
holder.notifyListeners();
}
use of com.navercorp.pinpoint.bootstrap.context.ServerMetaDataHolder in project pinpoint by naver.
the class MockApplicationContextModule method newServerMetaDataHolder.
protected ServerMetaDataHolder newServerMetaDataHolder() {
List<String> vmArgs = RuntimeMXBeanUtils.getVmArgs();
ServerMetaDataHolder serverMetaDataHolder = new ResettableServerMetaDataHolder(vmArgs);
return serverMetaDataHolder;
}
use of com.navercorp.pinpoint.bootstrap.context.ServerMetaDataHolder in project pinpoint by naver.
the class MockApplicationContextModule method configure.
@Override
protected void configure() {
final DataSender spanDataSender = newUdpSpanDataSender();
logger.debug("spanDataSender:{}", spanDataSender);
bind(DataSender.class).annotatedWith(SpanDataSender.class).toInstance(spanDataSender);
final DataSender statDataSender = newUdpStatDataSender();
logger.debug("statDataSender:{}", statDataSender);
bind(DataSender.class).annotatedWith(StatDataSender.class).toInstance(statDataSender);
StorageFactory storageFactory = newStorageFactory(spanDataSender);
logger.debug("spanFactory:{}", spanDataSender);
bind(StorageFactory.class).toInstance(storageFactory);
bind(PinpointClientFactory.class).toProvider(Providers.of((PinpointClientFactory) null));
bind(PinpointClient.class).toProvider(Providers.of((PinpointClient) null));
EnhancedDataSender enhancedDataSender = newTcpDataSender();
logger.debug("enhancedDataSender:{}", enhancedDataSender);
bind(EnhancedDataSender.class).toInstance(enhancedDataSender);
ServerMetaDataHolder serverMetaDataHolder = newServerMetaDataHolder();
logger.debug("serverMetaDataHolder:{}", serverMetaDataHolder);
bind(ServerMetaDataHolder.class).toInstance(serverMetaDataHolder);
bind(PluginContextLoadResult.class).toProvider(MockPluginContextLoadResultProvider.class).in(Scopes.SINGLETON);
}
use of com.navercorp.pinpoint.bootstrap.context.ServerMetaDataHolder in project pinpoint by naver.
the class ConnectorInitializeInterceptor method after.
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
if (isDebug) {
logger.afterInterceptor(target, args, result, throwable);
}
if (target instanceof Connector) {
final Connector connector = (Connector) target;
ServerMetaDataHolder holder = this.traceContext.getServerMetaDataHolder();
holder.addConnector(connector.getProtocol(), connector.getPort());
holder.notifyListeners();
}
}
Aggregations