Record Class RichObservationCollector.Snapshot

java.lang.Object
java.lang.Record
ai.pipestream.module.pipelineprobe.RichObservationCollector.Snapshot
Record Components:
stepName - the step this snapshot describes
totalCount - Out: distinct docs the node forwarded onward (processed)
uniqueCount - In: all distinct docs seen at this node (processed + no-op + reject)
duplicateCount - distinct docs re-delivered with the same outcome
rateRecent - throughput over the sliding recent window, in docs per second
rateOverall - overall throughput frozen at the last observation, in docs per second
latencyP50Ms - 50th-percentile service-time latency in milliseconds
latencyP95Ms - 95th-percentile service-time latency in milliseconds
latencyP99Ms - 99th-percentile service-time latency in milliseconds
latencyMaxMs - maximum observed service-time latency in milliseconds
recentDocIds - ring buffer of the most recent doc ids (with outcome suffixes)
errorCount - number of failed observations recorded
lastErrorMessage - the most recent non-empty error message, or empty string
noOpCount - distinct docs whose terminal outcome is NO-OP
rejectCount - distinct docs whose terminal outcome is REJECT
softErrorCount - number of non-fatal soft errors recorded
rejectReasons - reject reason name to count of rejects with that reason
Enclosing class:
RichObservationCollector

public static record RichObservationCollector.Snapshot(String stepName, long totalCount, long uniqueCount, long duplicateCount, double rateRecent, double rateOverall, long latencyP50Ms, long latencyP95Ms, long latencyP99Ms, long latencyMaxMs, List<String> recentDocIds, long errorCount, String lastErrorMessage, long noOpCount, long rejectCount, long softErrorCount, Map<String,Long> rejectReasons) extends Record
Snapshot returned by RichObservationCollector.snapshot(String, String); immutable.
  • Constructor Details

    • Snapshot

      public Snapshot(String stepName, long totalCount, long uniqueCount, long duplicateCount, double rateRecent, double rateOverall, long latencyP50Ms, long latencyP95Ms, long latencyP99Ms, long latencyMaxMs, List<String> recentDocIds, long errorCount, String lastErrorMessage, long noOpCount, long rejectCount, long softErrorCount, Map<String,Long> rejectReasons)
      Creates an instance of a Snapshot record class.
      Parameters:
      stepName - the value for the stepName record component
      totalCount - the value for the totalCount record component
      uniqueCount - the value for the uniqueCount record component
      duplicateCount - the value for the duplicateCount record component
      rateRecent - the value for the rateRecent record component
      rateOverall - the value for the rateOverall record component
      latencyP50Ms - the value for the latencyP50Ms record component
      latencyP95Ms - the value for the latencyP95Ms record component
      latencyP99Ms - the value for the latencyP99Ms record component
      latencyMaxMs - the value for the latencyMaxMs record component
      recentDocIds - the value for the recentDocIds record component
      errorCount - the value for the errorCount record component
      lastErrorMessage - the value for the lastErrorMessage record component
      noOpCount - the value for the noOpCount record component
      rejectCount - the value for the rejectCount record component
      softErrorCount - the value for the softErrorCount record component
      rejectReasons - the value for the rejectReasons record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stepName

      public String stepName()
      Returns the value of the stepName record component.
      Returns:
      the value of the stepName record component
    • totalCount

      public long totalCount()
      Returns the value of the totalCount record component.
      Returns:
      the value of the totalCount record component
    • uniqueCount

      public long uniqueCount()
      Returns the value of the uniqueCount record component.
      Returns:
      the value of the uniqueCount record component
    • duplicateCount

      public long duplicateCount()
      Returns the value of the duplicateCount record component.
      Returns:
      the value of the duplicateCount record component
    • rateRecent

      public double rateRecent()
      Returns the value of the rateRecent record component.
      Returns:
      the value of the rateRecent record component
    • rateOverall

      public double rateOverall()
      Returns the value of the rateOverall record component.
      Returns:
      the value of the rateOverall record component
    • latencyP50Ms

      public long latencyP50Ms()
      Returns the value of the latencyP50Ms record component.
      Returns:
      the value of the latencyP50Ms record component
    • latencyP95Ms

      public long latencyP95Ms()
      Returns the value of the latencyP95Ms record component.
      Returns:
      the value of the latencyP95Ms record component
    • latencyP99Ms

      public long latencyP99Ms()
      Returns the value of the latencyP99Ms record component.
      Returns:
      the value of the latencyP99Ms record component
    • latencyMaxMs

      public long latencyMaxMs()
      Returns the value of the latencyMaxMs record component.
      Returns:
      the value of the latencyMaxMs record component
    • recentDocIds

      public List<String> recentDocIds()
      Returns the value of the recentDocIds record component.
      Returns:
      the value of the recentDocIds record component
    • errorCount

      public long errorCount()
      Returns the value of the errorCount record component.
      Returns:
      the value of the errorCount record component
    • lastErrorMessage

      public String lastErrorMessage()
      Returns the value of the lastErrorMessage record component.
      Returns:
      the value of the lastErrorMessage record component
    • noOpCount

      public long noOpCount()
      Returns the value of the noOpCount record component.
      Returns:
      the value of the noOpCount record component
    • rejectCount

      public long rejectCount()
      Returns the value of the rejectCount record component.
      Returns:
      the value of the rejectCount record component
    • softErrorCount

      public long softErrorCount()
      Returns the value of the softErrorCount record component.
      Returns:
      the value of the softErrorCount record component
    • rejectReasons

      public Map<String,Long> rejectReasons()
      Returns the value of the rejectReasons record component.
      Returns:
      the value of the rejectReasons record component