Record Class CapturedInteraction
java.lang.Object
java.lang.Record
com.vaadin.observability.micrometer.insights.CapturedInteraction
- Record Components:
timestamp- when the interaction completedroute- the route template of the active view, e.g.orders/:orderId, so that every parameter value groups under one insight rather than one per valuelocation- the concrete location the interaction happened on, e.g.orders/17; reported per example rather than used for groupingcomponent- fully-qualified class of the component the user interacted withevent- the client event that triggered the invocation, e.g.clickrpcType- the Flow RPC invocation type, e.g.eventoutcome-OUTCOME_SUCCESSorOUTCOME_ERRORdurationMs- server-side RPC handling time in milliseconds,-1if unknown. This covers the invocation only: not session-lock wait, network, or client-side renderingthresholdMs- the UX budget this interaction was measured against,-1when it was not retained for being slow. Carried per interaction so a report never has to guess which budget was in forcedetailsIncluded- 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 absentexceptionType- fully-qualified class of the root-cause exception,nullfor successful interactionsexceptionMessage- message of the root cause, truncated;nullwhen it was not collected (seedetailsIncluded) or the cause had noneapplicationFrame- first stack frame in application code (not JDK/framework), the most likely location of the bug;nullfor successful interactionsstackTop- the top frames of the root-cause stack trace;nullfor successful interactions and when detail was not collectedsessionId- 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 sessionuiId- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCapturedInteraction(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 aCapturedInteractionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationFramerecord component.Returns the value of thecomponentrecord component.booleanReturns the value of thedetailsIncludedrecord component.longReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.Returns the value of theexceptionMessagerecord component.Returns the value of theexceptionTyperecord component.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.outcome()Returns the value of theoutcomerecord component.route()Returns the value of therouterecord component.rpcType()Returns the value of therpcTyperecord component.Returns the value of thesessionIdrecord component.stackTop()Returns the value of thestackToprecord component.longReturns the value of thethresholdMsrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.intuiId()Returns the value of theuiIdrecord component.
-
Field Details
-
OUTCOME_SUCCESS
- See Also:
-
OUTCOME_ERROR
- See Also:
-
-
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 aCapturedInteractionrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentroute- the value for therouterecord componentlocation- the value for thelocationrecord componentcomponent- the value for thecomponentrecord componentevent- the value for theeventrecord componentrpcType- the value for therpcTyperecord componentoutcome- the value for theoutcomerecord componentdurationMs- the value for thedurationMsrecord componentthresholdMs- the value for thethresholdMsrecord componentdetailsIncluded- the value for thedetailsIncludedrecord componentexceptionType- the value for theexceptionTyperecord componentexceptionMessage- the value for theexceptionMessagerecord componentapplicationFrame- the value for theapplicationFramerecord componentstackTop- the value for thestackToprecord componentsessionId- the value for thesessionIdrecord componentuiId- the value for theuiIdrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
rpcType
Returns the value of therpcTyperecord component.- Returns:
- the value of the
rpcTyperecord component
-
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
thresholdMs
public long thresholdMs()Returns the value of thethresholdMsrecord component.- Returns:
- the value of the
thresholdMsrecord component
-
detailsIncluded
public boolean detailsIncluded()Returns the value of thedetailsIncludedrecord component.- Returns:
- the value of the
detailsIncludedrecord component
-
exceptionType
Returns the value of theexceptionTyperecord component.- Returns:
- the value of the
exceptionTyperecord component
-
exceptionMessage
Returns the value of theexceptionMessagerecord component.- Returns:
- the value of the
exceptionMessagerecord component
-
applicationFrame
Returns the value of theapplicationFramerecord component.- Returns:
- the value of the
applicationFramerecord component
-
stackTop
Returns the value of thestackToprecord component.- Returns:
- the value of the
stackToprecord component
-
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
uiId
public int uiId()Returns the value of theuiIdrecord component.- Returns:
- the value of the
uiIdrecord component
-