Search in sources :

Example 1 with HttpClientResponseImpl

use of io.vertx.core.http.impl.HttpClientResponseImpl in project pinpoint by naver.

the class HttpClientRequestImplDoHandleResponseInterceptor method doInBeforeTrace.

@Override
public void doInBeforeTrace(SpanEventRecorder recorder, AsyncContext asyncContext, Object target, Object[] args) {
    if (!validate(args)) {
        return;
    }
    final HttpClientResponseImpl response = (HttpClientResponseImpl) args[0];
    if (statusCode) {
        recorder.recordAttribute(AnnotationKey.HTTP_STATUS_CODE, response.statusCode());
    }
    ((AsyncContextAccessor) response)._$PINPOINT$_setAsyncContext(asyncContext);
}
Also used : HttpClientResponseImpl(io.vertx.core.http.impl.HttpClientResponseImpl) AsyncContextAccessor(com.navercorp.pinpoint.bootstrap.async.AsyncContextAccessor)

Example 2 with HttpClientResponseImpl

use of io.vertx.core.http.impl.HttpClientResponseImpl in project pinpoint by naver.

the class HttpClientRequestImplDoHandleResponseInterceptor method doInBeforeTrace.

@Override
public void doInBeforeTrace(SpanEventRecorder recorder, AsyncTraceId asyncTraceId, Object target, Object[] args) {
    if (!validate(args)) {
        return;
    }
    final HttpClientResponseImpl response = (HttpClientResponseImpl) args[0];
    if (statusCode) {
        recorder.recordAttribute(AnnotationKey.HTTP_STATUS_CODE, response.statusCode());
    }
    ((AsyncTraceIdAccessor) response)._$PINPOINT$_setAsyncTraceId(asyncTraceId);
}
Also used : HttpClientResponseImpl(io.vertx.core.http.impl.HttpClientResponseImpl) AsyncTraceIdAccessor(com.navercorp.pinpoint.bootstrap.async.AsyncTraceIdAccessor)

Aggregations

HttpClientResponseImpl (io.vertx.core.http.impl.HttpClientResponseImpl)2 AsyncContextAccessor (com.navercorp.pinpoint.bootstrap.async.AsyncContextAccessor)1 AsyncTraceIdAccessor (com.navercorp.pinpoint.bootstrap.async.AsyncTraceIdAccessor)1