@Override
    public void after(final Object target, final int apiId, final Object[] args, final Object result, final Throwable throwable) {
        if (isDebug) {
            logger.afterInterceptor(target, args, result, throwable);
        }
        final Trace trace = traceContext.currentTraceObject();
        if (trace == null) {
            return;
        }

        if (!trace.canSampled()) {
            traceContext.removeTraceObject();
            trace.close();
            return;
        }
        try {
            final SpanEventRecorder recorder = trace.currentSpanEventRecorder();
            recorder.recordApiId(apiId);
            recorder.recordException(throwable);
        } catch (final Throwable th) {
            if (logger.isWarnEnabled()) {
                logger.warn("AFTER. Caused:{}", th.getMessage(), th);
            }
        } finally {
            trace.traceBlockEnd();
            trace.close();
            traceContext.removeTraceObject();
        }
    }
Record root span.

@param recorder      the recorder
@param rpcName       the rpc name
@param remoteAddress
agent-module/plugins/jboss/src/main/java/com/navercorp/pinpoint/plugin/jboss/interceptor/MethodInvocationHandlerInterceptor.java