@Override public void after(Object target, Object[] args, Object result, Throwable throwable) { if (isDebug) { logger.afterInterceptor(target, args, result, throwable); } // Unset server markers if (args[0] instanceof AsyncFrameBuffer) { AsyncFrameBuffer frameBuffer = (AsyncFrameBuffer) args[0]; attachMarkersToInputProtocol(frameBuffer.getInputProtocol(), false); } final Trace trace = this.traceContext.currentRawTraceObject(); if (trace == null) { return; } this.traceContext.removeTraceObject(); if (trace.canSampled()) { try { processTraceObject(trace, target, args, throwable); } catch (Throwable t) { logger.warn("Error processing trace object. Cause:{}", t.getMessage(), t); } finally { trace.close(); } } }
@Override public void before(Object target, Object[] args) { if (isDebug) { logger.beforeInterceptor(target, args); } // process(final AsyncFrameBuffer fb) if (args.length != 1) { return; } // Set server markers if (args[0] instanceof AsyncFrameBuffer) { AsyncFrameBuffer frameBuffer = (AsyncFrameBuffer) args[0]; attachMarkersToInputProtocol(frameBuffer.getInputProtocol(), true); } }