demo-skywalking/src/test/java/com/github/shoothzj/demo/skywalking/util/GlobalIdGenerator.java
public static String generate() {
        return join(
                '.',
                PROCESS_ID,
                String.valueOf(Thread.currentThread().getId()),
                String.valueOf(THREAD_ID_SEQUENCE.get().nextSeq())
        );
    }
/**
     * Generate a new id, combined by three parts.
     * <p>
     * The first one represents application instance id.
     * <p>
     * The second one represents thread id.
     * <p>
     * The third one also has two parts, 1) a timestamp, measured in milliseconds 2) a seq, in current thread, between
     * 0(included) and 9999(included)
     *
     * @return unique id to represent a trace or segment
     */
Generate a new id, combined by three parts.

The first one represents application instance id.

The second one represents thread id.

The third one also has two parts, 1) a timestamp, measured in milliseconds 2) a seq, in current thread, between
0(included) and 9999(included)

@return unique id to represent a trace or segment
Generate a new id combined by three parts . The first one represents application instance id . The second one represents thread id . The third one also has two parts 1 ) a timestamp measured in milliseconds 2 ) a seq in current thread between 0 ( included ) and 9999 ( included ) @return unique id to represent a trace or segment
public static String generate() {
        return join(
                '.',
                PROCESS_ID,
                String.valueOf(Thread.currentThread().getId()),
                String.valueOf(THREAD_ID_SEQUENCE.get().nextSeq())
        );
    }
public static String generate ( ) { return join ( '.' , PROCESS_ID , String . valueOf ( Thread . currentThread ( ) . getId ( ) ) , String . valueOf ( THREAD_ID_SEQUENCE . get ( ) . nextSeq ( ) ) ) ; }
Generate a new id, combined by three parts.
Generate a new id combined by three parts .