use of com.navercorp.pinpoint.plugin.okhttp.v2.ConnectionGetter in project pinpoint by naver.
the class HttpEngineConnectMethodInterceptor method doInAfterTrace.
@Override
protected void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) {
recorder.recordApi(methodDescriptor);
recorder.recordServiceType(OkHttpConstants.OK_HTTP_CLIENT_INTERNAL);
recorder.recordException(throwable);
if (target instanceof ConnectionGetter) {
final Connection connection = ((ConnectionGetter) target)._$PINPOINT$_getConnection();
if (connection != null) {
final String hostAndPort = getHostAndPort(connection);
recorder.recordAttribute(AnnotationKey.HTTP_INTERNAL_DISPLAY, hostAndPort);
}
}
}
Aggregations