Search in sources :

Example 1 with HttpClientRequestWrapper

use of com.navercorp.pinpoint.plugin.vertx.HttpClientRequestWrapper in project pinpoint by naver.

the class PromiseImplInterceptor method doInAfterTrace.

@Override
public void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) {
    recorder.recordApi(methodDescriptor);
    recorder.recordException(throwable);
    recorder.recordServiceType(VertxConstants.VERTX_HTTP_CLIENT);
    final HttpClientRequest request = (HttpClientRequest) args[0];
    String host = request.getHost();
    if (host == null) {
        host = "UNKNOWN";
    }
    final ClientRequestWrapper clientRequest = new HttpClientRequestWrapper(request, host);
    this.clientRequestRecorder.record(recorder, clientRequest, throwable);
    this.cookieRecorder.record(recorder, request, throwable);
}
Also used : HttpClientRequest(io.vertx.core.http.HttpClientRequest) HttpClientRequestWrapper(com.navercorp.pinpoint.plugin.vertx.HttpClientRequestWrapper) ClientRequestWrapper(com.navercorp.pinpoint.bootstrap.plugin.request.ClientRequestWrapper) HttpClientRequestWrapper(com.navercorp.pinpoint.plugin.vertx.HttpClientRequestWrapper)

Aggregations

ClientRequestWrapper (com.navercorp.pinpoint.bootstrap.plugin.request.ClientRequestWrapper)1 HttpClientRequestWrapper (com.navercorp.pinpoint.plugin.vertx.HttpClientRequestWrapper)1 HttpClientRequest (io.vertx.core.http.HttpClientRequest)1