Search in sources :

Example 1 with UndertowAsyncListener

use of com.navercorp.pinpoint.plugin.undertowservlet.UndertowAsyncListener in project pinpoint by naver.

the class HttpServletRequestImplStartAsyncInterceptor method doInAfterTrace.

@Override
protected void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) {
    if (validate(target, result, throwable)) {
        final AsyncContext asyncContext = (AsyncContext) result;
        final AsyncListener asyncListener = new UndertowAsyncListener(this.traceContext, recorder.recordNextAsyncContext(true));
        asyncContext.addListener(asyncListener);
        if (isDebug) {
            logger.debug("Add async listener {}", asyncListener);
        }
    }
    recorder.recordServiceType(UndertowServletConstants.UNDERTOW_SERVLET_METHOD);
    recorder.recordApi(methodDescriptor);
    recorder.recordException(throwable);
}
Also used : AsyncListener(javax.servlet.AsyncListener) UndertowAsyncListener(com.navercorp.pinpoint.plugin.undertowservlet.UndertowAsyncListener) AsyncContext(javax.servlet.AsyncContext) UndertowAsyncListener(com.navercorp.pinpoint.plugin.undertowservlet.UndertowAsyncListener)

Aggregations

UndertowAsyncListener (com.navercorp.pinpoint.plugin.undertowservlet.UndertowAsyncListener)1 AsyncContext (javax.servlet.AsyncContext)1 AsyncListener (javax.servlet.AsyncListener)1