Class TraceIdUtils

java.lang.Object
org.apache.ignite.lang.util.TraceIdUtils

public class TraceIdUtils extends Object
This utility class allows to extract trace identifier from an instance of TraceableException or creating a new trace identifier.
  • Constructor Details

    • TraceIdUtils

      public TraceIdUtils()
  • Method Details

    • getOrCreateTraceId

      public static UUID getOrCreateTraceId(@Nullable @Nullable Throwable t)
      Returns trace identifier from the provided throwable if it is an instance of TraceableException or it has a cause that is an instance of TraceableException. Otherwise a new trace identifier is generated.
      Parameters:
      t - Throwable to extract a trace identifier.
      Returns:
      Returns trace identifier.