Class AuditTraceContext

java.lang.Object
org.idempiere.tracking.AuditTraceContext

public final class AuditTraceContext extends Object
Thread-local carrier for the ExternalTraceId used in audit changelog entries.
  • Method Details

    • getExternalTraceId

      public static String getExternalTraceId()
      Returns the ExternalTraceId bound to the current thread, or null if none has been set. A null return is normal for non-REST code paths.
    • setExternalTraceId

      public static void setExternalTraceId(String externalTraceId)
      Binds an ExternalTraceId to the current thread.
      Parameters:
      externalTraceId -
    • clear

      public static void clear()
      Removes the ExternalTraceId bound to the current thread. Must be called in a finally block at every entry point that calls setExternalTraceId(String).