All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yammer.telemetry.tracing.IDGenerator Maven / Gradle / Ivy

The newest version!
package com.yammer.telemetry.tracing;

import java.math.BigInteger;
import java.util.Random;

public class IDGenerator {
    private static final Random ID_GENERATOR = new Random(System.currentTimeMillis());

    public BigInteger generateTraceId() {
        return new BigInteger(64, ID_GENERATOR);
    }

    public BigInteger generateSpanId() {
        return new BigInteger(32, ID_GENERATOR);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy