Record Class CapturedInteraction

java.lang.Object
java.lang.Record
com.vaadin.observability.micrometer.insights.CapturedInteraction
Record Components:
timestamp - when the interaction completed
route - the route template of the active view, e.g. orders/:orderId, so that every parameter value groups under one insight rather than one per value
location - the concrete location the interaction happened on, e.g. orders/17; reported per example rather than used for grouping
component - fully-qualified class of the component the user interacted with
event - the client event that triggered the invocation, e.g. click
rpcType - the Flow RPC invocation type, e.g. event
outcome - OUTCOME_SUCCESS or OUTCOME_ERROR
durationMs - server-side RPC handling time in milliseconds, -1 if unknown. This covers the invocation only: not session-lock wait, network, or client-side rendering
thresholdMs - the UX budget this interaction was measured against, -1 when it was not retained for being slow. Carried per interaction so a report never has to guess which budget was in force
detailsIncluded - whether potentially sensitive detail was collected for this interaction, i.e. the raw session id, the exception message and the stack frames. Recorded per interaction so a report can say that a field was withheld rather than absent
exceptionType - fully-qualified class of the root-cause exception, null for successful interactions
exceptionMessage - message of the root cause, truncated; null when it was not collected (see detailsIncluded) or the cause had none
applicationFrame - first stack frame in application code (not JDK/framework), the most likely location of the bug; null for successful interactions
stackTop - the top frames of the root-cause stack trace; null for successful interactions and when detail was not collected
sessionId - the Vaadin session id when detail was collected, otherwise a short one-way hash of it, which still correlates the examples of one insight without identifying the session
uiId - UI id within the session

public record CapturedInteraction(Instant timestamp, String route, String location, String component, String event, String rpcType, String outcome, long durationMs, long thresholdMs, boolean detailsIncluded, String exceptionType, String exceptionMessage, String applicationFrame, List<String> stackTop, String sessionId, int uiId) extends Record
One captured user interaction worth surfacing as an insight, with everything needed to backtrack and replicate it: which route, which component, which user action, how long it took, and, for failures, which exception and where in application code it blew up.

Only interesting interactions are retained: failed ones and ones slower than the UX budget (InteractionCollector.UX_BUDGET_MS).

  • Field Details

  • Constructor Details

    • CapturedInteraction

      public CapturedInteraction(Instant timestamp, String route, String location, String component, String event, String rpcType, String outcome, long durationMs, long thresholdMs, boolean detailsIncluded, String exceptionType, String exceptionMessage, String applicationFrame, List<String> stackTop, String sessionId, int uiId)
      Creates an instance of a CapturedInteraction record class.
      Parameters:
      timestamp - the value for the timestamp record component
      route - the value for the route record component
      location - the value for the location record component
      component - the value for the component record component
      event - the value for the event record component
      rpcType - the value for the rpcType record component
      outcome - the value for the outcome record component
      durationMs - the value for the durationMs record component
      thresholdMs - the value for the thresholdMs record component
      detailsIncluded - the value for the detailsIncluded record component
      exceptionType - the value for the exceptionType record component
      exceptionMessage - the value for the exceptionMessage record component
      applicationFrame - the value for the applicationFrame record component
      stackTop - the value for the stackTop record component
      sessionId - the value for the sessionId record component
      uiId - the value for the uiId 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 '=='.
      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.
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • route

      public String route()
      Returns the value of the route record component.
      Returns:
      the value of the route record component
    • location

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

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

      public String event()
      Returns the value of the event record component.
      Returns:
      the value of the event record component
    • rpcType

      public String rpcType()
      Returns the value of the rpcType record component.
      Returns:
      the value of the rpcType record component
    • outcome

      public String outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • durationMs

      public long durationMs()
      Returns the value of the durationMs record component.
      Returns:
      the value of the durationMs record component
    • thresholdMs

      public long thresholdMs()
      Returns the value of the thresholdMs record component.
      Returns:
      the value of the thresholdMs record component
    • detailsIncluded

      public boolean detailsIncluded()
      Returns the value of the detailsIncluded record component.
      Returns:
      the value of the detailsIncluded record component
    • exceptionType

      public String exceptionType()
      Returns the value of the exceptionType record component.
      Returns:
      the value of the exceptionType record component
    • exceptionMessage

      public String exceptionMessage()
      Returns the value of the exceptionMessage record component.
      Returns:
      the value of the exceptionMessage record component
    • applicationFrame

      public String applicationFrame()
      Returns the value of the applicationFrame record component.
      Returns:
      the value of the applicationFrame record component
    • stackTop

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

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • uiId

      public int uiId()
      Returns the value of the uiId record component.
      Returns:
      the value of the uiId record component