use of com.navercorp.pinpoint.bootstrap.pair.NameIntValuePair in project pinpoint by naver.
the class HttpRequestExecutorExecuteMethodInterceptor method getHost.
private NameIntValuePair<String> getHost() {
final InterceptorScopeInvocation transaction = interceptorScope.getCurrentInvocation();
final Object attachment = getAttachment(transaction);
if (attachment instanceof HttpCallContext) {
HttpCallContext callContext = (HttpCallContext) attachment;
return new NameIntValuePair<>(callContext.getHost(), callContext.getPort());
}
return new NameIntValuePair<>(null, -1);
}
use of com.navercorp.pinpoint.bootstrap.pair.NameIntValuePair in project pinpoint by naver.
the class DefaultClientExchangeHandlerImplStartMethodInterceptor method getHost.
private NameIntValuePair<String> getHost(final Object target) {
if (target instanceof RequestProducerGetter) {
final HttpAsyncRequestProducer producer = ((RequestProducerGetter) target)._$PINPOINT$_getRequestProducer();
final HttpHost httpHost = producer.getTarget();
if (httpHost != null) {
return new NameIntValuePair<>(httpHost.getHostName(), httpHost.getPort());
}
}
return new NameIntValuePair<>(null, -1);
}
Aggregations