private Trace createTrace(final Object target, final Object[] args) {
        final Trace trace = traceContext.newTraceObject();
        final Connection connection = RemotingContext.getConnection();
        final String remoteAddress = JbossUtility.fetchRemoteAddress(connection);
        if (trace.canSampled()) {
            final SpanRecorder recorder = trace.getSpanRecorder();
            final String methodName = getMethodName(args);
            recordRootSpan(recorder, methodName, remoteAddress);
            if (isDebug) {
                logger.debug("Trace sampling is true, Recording trace. methodInvoked:{}, remoteAddress:{}", methodName, remoteAddress);
            }
        } else {
            if (isDebug) {
                final String methodName = getMethodName(args);
                logger.debug("Trace sampling is false, Skip recording trace. methodInvoked:{}, remoteAddress:{}", methodName, remoteAddress);
            }
        }
        return trace;
    }
Creates the trace.

@param target the target
@param args   the args
@return the trace
agent-module/plugins/jboss/src/main/java/com/navercorp/pinpoint/plugin/jboss/interceptor/MethodInvocationHandlerInterceptor.java