Record Class CapturedQuery
java.lang.Object
java.lang.Record
com.vaadin.observability.micrometer.insights.CapturedQuery
- Record Components:
timestamp- when the query finishedroute- the route template of the view the query belongs to, so every parameter value groups under one insightcomponent- fully-qualified class of the component whose data was loaded, ornullwhen the data communicator is driven by a bare elementkind-KIND_COUNTorKIND_FETCHfiltered- whether the query carried a filter, which distinguishes a combo box loading matches for typed text from one loading everythingoffset- index of the first item requested,-1for a countlimit- number of items requested,-1for a countrows- for a fetch, the items actually returned; for a count, the reported item total;-1when the query threwdurationMs- how long the query took, in millisecondsthresholdMs- the budget this query was measured against,-1when it was not retained for being slowoutcome-OUTCOME_SUCCESSorOUTCOME_ERRORexceptionType- fully-qualified class of the throwable,nullfor successful queries
public record CapturedQuery(Instant timestamp, String route, String component, String kind, boolean filtered, int offset, int limit, int rows, long durationMs, long thresholdMs, String outcome, String exceptionType)
extends Record
One captured data provider query worth surfacing as an insight: which
component asked for data, on which route, how much it asked for, how much
came back, and how long it took.
Kept separate from CapturedInteraction rather than folded into it. An
interaction is a user action and carries a DOM event, an RPC type and, when
it fails, a stack frame in application code. A query has none of those when
it is merely slow, and carries a range and a row count instead. One record
covering both would be mostly empty fields either way, and the JSON at the
insights endpoint is a published contract, so a reader is better served by
two honest shapes than one loose one.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentrecord component.longReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionTyperecord component.booleanfiltered()Returns the value of thefilteredrecord component.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.intlimit()Returns the value of thelimitrecord component.intoffset()Returns the value of theoffsetrecord component.outcome()Returns the value of theoutcomerecord component.route()Returns the value of therouterecord component.introws()Returns the value of therowsrecord component.longReturns the value of thethresholdMsrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
KIND_COUNT
- See Also:
-
KIND_FETCH
- See Also:
-
OUTCOME_SUCCESS
- See Also:
-
OUTCOME_ERROR
- See Also:
-
-
Constructor Details
-
CapturedQuery
public CapturedQuery(Instant timestamp, String route, String component, String kind, boolean filtered, int offset, int limit, int rows, long durationMs, long thresholdMs, String outcome, String exceptionType) Creates an instance of aCapturedQueryrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentroute- the value for therouterecord componentcomponent- the value for thecomponentrecord componentkind- the value for thekindrecord componentfiltered- the value for thefilteredrecord componentoffset- the value for theoffsetrecord componentlimit- the value for thelimitrecord componentrows- the value for therowsrecord componentdurationMs- the value for thedurationMsrecord componentthresholdMs- the value for thethresholdMsrecord componentoutcome- the value for theoutcomerecord componentexceptionType- the value for theexceptionTyperecord 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
-
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
filtered
public boolean filtered()Returns the value of thefilteredrecord component.- Returns:
- the value of the
filteredrecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
rows
public int rows()Returns the value of therowsrecord component.- Returns:
- the value of the
rowsrecord 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
-
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
exceptionType
Returns the value of theexceptionTyperecord component.- Returns:
- the value of the
exceptionTyperecord component
-