@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { PipelineContinuationBehavior methodExecutionResponse; boolean shouldLinkAndUnlinkDTraceInfo = shouldLinkAndUnlinkDistributedTraceInfoForMethod( DO_CHANNEL_READ, isDefaultDoChannelReadImpl, forceEnableDTraceOnAllMethods, debugHandlerMethodCalls, ctx, msg, null ); Pair<Deque<Span>, Map<String, String>> origThreadInfo = null; try { if (shouldLinkAndUnlinkDTraceInfo) origThreadInfo = linkTracingAndMdcToCurrentThread(ctx); if (debugHandlerMethodCalls) logger.debug("############### channelRead for {}", this.getClass().getName()); methodExecutionResponse = doChannelRead(ctx, msg); } finally { if (shouldLinkAndUnlinkDTraceInfo) unlinkTracingAndMdcFromCurrentThread(ctx, origThreadInfo); } if (methodExecutionResponse == null || CONTINUE.equals(methodExecutionResponse)) super.channelRead(ctx, msg); }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { PipelineContinuationBehavior methodExecutionResponse; boolean shouldLinkAndUnlinkDTraceInfo = shouldLinkAndUnlinkDistributedTraceInfoForMethod( DO_CHANNEL_READ, isDefaultDoChannelReadImpl, forceEnableDTraceOnAllMethods, debugHandlerMethodCalls, ctx, msg, null ); Pair<Deque<Span>, Map<String, String>> origThreadInfo = null; try { if (shouldLinkAndUnlinkDTraceInfo) origThreadInfo = linkTracingAndMdcToCurrentThread(ctx); if (debugHandlerMethodCalls) logger.debug("############### channelRead for {}", this.getClass().getName()); methodExecutionResponse = doChannelRead(ctx, msg); } finally { if (shouldLinkAndUnlinkDTraceInfo) unlinkTracingAndMdcFromCurrentThread(ctx, origThreadInfo); } if (methodExecutionResponse == null || CONTINUE.equals(methodExecutionResponse)) super.channelRead(ctx, msg); }