Search in sources :

Example 1 with AsyncState

use of com.navercorp.pinpoint.bootstrap.context.AsyncState in project pinpoint by naver.

the class SpanAsyncEventSimpleAroundInterceptor method finishAsyncState.

private void finishAsyncState(final AsyncTraceId asyncTraceId) {
    if (asyncTraceId instanceof AsyncStateSupport) {
        final AsyncStateSupport asyncStateSupport = (AsyncStateSupport) asyncTraceId;
        AsyncState asyncState = asyncStateSupport.getAsyncState();
        asyncState.finish();
        if (isDebug) {
            logger.debug("finished asyncState. asyncTraceId={}", asyncTraceId);
        }
    }
}
Also used : AsyncState(com.navercorp.pinpoint.bootstrap.context.AsyncState) AsyncStateSupport(com.navercorp.pinpoint.bootstrap.context.AsyncStateSupport)

Example 2 with AsyncState

use of com.navercorp.pinpoint.bootstrap.context.AsyncState in project pinpoint by naver.

the class AsyncContextSpanEventEndPointInterceptor method finishAsyncState.

private void finishAsyncState(final AsyncContext asyncContext) {
    if (asyncContext instanceof AsyncStateSupport) {
        final AsyncStateSupport asyncStateSupport = (AsyncStateSupport) asyncContext;
        AsyncState asyncState = asyncStateSupport.getAsyncState();
        asyncState.finish();
        if (isDebug) {
            logger.debug("finished asyncState. asyncTraceId={}", asyncContext);
        }
    }
}
Also used : AsyncState(com.navercorp.pinpoint.bootstrap.context.AsyncState) AsyncStateSupport(com.navercorp.pinpoint.bootstrap.context.AsyncStateSupport)

Example 3 with AsyncState

use of com.navercorp.pinpoint.bootstrap.context.AsyncState in project pinpoint by naver.

the class AsyncListenerInterceptorHelper method finish.

private void finish() {
    if (this.asyncContext instanceof AsyncStateSupport) {
        final AsyncStateSupport asyncStateSupport = (AsyncStateSupport) this.asyncContext;
        AsyncState asyncState = asyncStateSupport.getAsyncState();
        asyncState.finish();
    }
}
Also used : AsyncState(com.navercorp.pinpoint.bootstrap.context.AsyncState) AsyncStateSupport(com.navercorp.pinpoint.bootstrap.context.AsyncStateSupport)

Example 4 with AsyncState

use of com.navercorp.pinpoint.bootstrap.context.AsyncState in project pinpoint by naver.

the class WrappedAsyncSpanEventRecorder method recordNextAsyncContext.

@Override
public AsyncContext recordNextAsyncContext(boolean asyncStateSupport) {
    if (asyncStateSupport) {
        final TraceRoot traceRoot = this.traceRoot;
        final AsyncId asyncIdObject = getNextAsyncId();
        final boolean isDisabled = isOverflowState();
        final AsyncState asyncState = this.asyncState;
        asyncState.setup();
        final AsyncContext asyncContext = asyncContextFactory.newAsyncContext(traceRoot, asyncIdObject, isDisabled, asyncState);
        return asyncContext;
    }
    return recordNextAsyncContext();
}
Also used : AsyncState(com.navercorp.pinpoint.bootstrap.context.AsyncState) AsyncId(com.navercorp.pinpoint.profiler.context.AsyncId) AsyncContext(com.navercorp.pinpoint.bootstrap.context.AsyncContext) TraceRoot(com.navercorp.pinpoint.profiler.context.id.TraceRoot)

Example 5 with AsyncState

use of com.navercorp.pinpoint.bootstrap.context.AsyncState in project pinpoint by naver.

the class AsyncContextSpanEventEndPointInterceptor method finishAsyncState.

private void finishAsyncState(final AsyncContext asyncContext) {
    if (asyncContext instanceof AsyncStateSupport) {
        final AsyncStateSupport asyncStateSupport = (AsyncStateSupport) asyncContext;
        AsyncState asyncState = asyncStateSupport.getAsyncState();
        asyncState.finish();
        if (isDebug) {
            logger.debug("finished asyncState. asyncTraceId={}", asyncContext);
        }
    }
}
Also used : AsyncState(com.navercorp.pinpoint.bootstrap.context.AsyncState) AsyncStateSupport(com.navercorp.pinpoint.bootstrap.context.AsyncStateSupport)

Aggregations

AsyncState (com.navercorp.pinpoint.bootstrap.context.AsyncState)10 AsyncStateSupport (com.navercorp.pinpoint.bootstrap.context.AsyncStateSupport)7 TraceRoot (com.navercorp.pinpoint.profiler.context.id.TraceRoot)3 AsyncContext (com.navercorp.pinpoint.bootstrap.context.AsyncContext)2 SpanRecorder (com.navercorp.pinpoint.bootstrap.context.SpanRecorder)2 TraceSampler (com.navercorp.pinpoint.bootstrap.sampler.TraceSampler)2 ActiveTraceHandle (com.navercorp.pinpoint.profiler.context.active.ActiveTraceHandle)2 ListenableAsyncState (com.navercorp.pinpoint.profiler.context.id.ListenableAsyncState)2 WrappedSpanEventRecorder (com.navercorp.pinpoint.profiler.context.recorder.WrappedSpanEventRecorder)2 Storage (com.navercorp.pinpoint.profiler.context.storage.Storage)2 AsyncContextAccessor (com.navercorp.pinpoint.bootstrap.async.AsyncContextAccessor)1 SpanEventRecorder (com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder)1 Trace (com.navercorp.pinpoint.bootstrap.context.Trace)1 TraceId (com.navercorp.pinpoint.bootstrap.context.TraceId)1 AsyncId (com.navercorp.pinpoint.profiler.context.AsyncId)1 HttpServerRequest (reactor.netty.http.server.HttpServerRequest)1 HttpServerResponse (reactor.netty.http.server.HttpServerResponse)1