Class ObservabilitySettings
builder().-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLargest acceptedgetDatabaseSpanLimit(): the most query spans one parent span may carry before the rest are only counted.static final intLargest acceptedgetInsightsCapacity().static final intLargest acceptedgetRouteCardinalityLimit(). -
Method Summary
Modifier and TypeMethodDescriptionbuilder()intintMaximum number ofvaadin.db.queryspans under any one parent span — a request, an RPC, a data provider fetch.intMaximum number of records retained for the insights endpoint, applied to each buffer rather than shared between them: interactions, data provider queries and browser errors are retained separately, so with all three collectors active the total is three times this value.intintBytes to attribute to one state-tree node when publishingvaadin.ui.state.size, or0to publish no byte figure at all.intHow many measurements in a row a collection held by a view has to grow in before it is reported as growing, or0to not read the collections views hold at all.intMinimum milliseconds between two measurements of the same UI, so a burst of interactions costs one tree walk rather than one per event.booleanisClient()booleanisData()Whether the data provider queries made by lazy-loading components are measured.booleanbooleanbooleanisErrors()booleanWhether failed and over-budget user interactions are retained so the insights endpoint can backtrack a user report to a replicable interaction.booleanWhether interaction insights may carry potentially sensitive detail: the raw session id, the exception message and the top stack frames.booleanbooleanbooleanisResync()Whether to count client message resends, resynchronizations and unexpected message ids.booleanbooleanisTraces()booleanbooleanisUis()booleanWhether to measure how much state each UI holds and publish thevaadin.ui.state.*aggregates.
-
Field Details
-
MAX_INSIGHTS_CAPACITY
public static final int MAX_INSIGHTS_CAPACITYLargest acceptedgetInsightsCapacity(). Each insights buffer is held in memory for the life of the service, up to three of them, so a misconfigured value would otherwise retain an unbounded amount.- See Also:
-
MAX_ROUTE_CARDINALITY_LIMIT
public static final int MAX_ROUTE_CARDINALITY_LIMITLargest acceptedgetRouteCardinalityLimit(). The limit caps tag values that multiply with each other onvaadin.errors, so it bounds the series a metrics backend has to hold.- See Also:
-
MAX_DATABASE_SPAN_LIMIT
public static final int MAX_DATABASE_SPAN_LIMITLargest acceptedgetDatabaseSpanLimit(): the most query spans one parent span may carry before the rest are only counted.- See Also:
-
-
Method Details
-
builder
-
isSessions
public boolean isSessions() -
isUis
public boolean isUis() -
isUiState
public boolean isUiState()Whether to measure how much state each UI holds and publish thevaadin.ui.state.*aggregates. Off by default: it walks the component tree of the UI an interaction touched, which costs work outside the request's own path.- Returns:
trueif UI state metrics are enabled
-
isData
public boolean isData()Whether the data provider queries made by lazy-loading components are measured. On by default: for a data-heavy view these queries are usually where a slow interaction spends its time.- Returns:
trueif data query metrics are recorded
-
isRequests
public boolean isRequests() -
isErrors
public boolean isErrors() -
isClient
public boolean isClient() -
isResync
public boolean isResync()Whether to count client message resends, resynchronizations and unexpected message ids. -
isTraces
public boolean isTraces() -
isTracesSessionId
public boolean isTracesSessionId() -
isInsights
public boolean isInsights()Whether failed and over-budget user interactions are retained so the insights endpoint can backtrack a user report to a replicable interaction. On by default.Independent of
isInsightsDetails(), which only governs how much detail a retained interaction carries. Collection still requiresisErrors()for failures andisRequests()for slow interactions, since those supply the respective capture paths. -
isInsightsDetails
public boolean isInsightsDetails()Whether interaction insights may carry potentially sensitive detail: the raw session id, the exception message and the top stack frames.Off by default. The insights payload is meant to travel — into issue trackers, AI agents and whatever a consumer forwards it to — so the detail that could contain personal or secret data is withheld unless an application asks for it. What remains is still actionable: the route, the component, the event, the exception type and the first application stack frame. With this off the session id is reduced to a short one-way hash, which still correlates the examples of one insight without identifying the session.
-
isDatabase
public boolean isDatabase() -
isDatabaseStatement
public boolean isDatabaseStatement() -
getDatabaseSpanLimit
public int getDatabaseSpanLimit()Maximum number ofvaadin.db.queryspans under any one parent span — a request, an RPC, a data provider fetch. An N+1 load issues a query per row, and sixty thousand spans for one click overflow the tracing exporter's queue, which then drops spans from every request, not just that one. Past the limit a query still counts toward thevaadin.db.querytimer and the insights, but gets no span; the parent span carries how many it left out asvaadin.db.queries.unspanned. A query with no parent span is not limited.- Returns:
- the most query spans per parent span,
0for none under a parent span
-
getRouteCardinalityLimit
public int getRouteCardinalityLimit() -
getClientRatePerSession
public int getClientRatePerSession() -
getUiStateSampleInterval
public int getUiStateSampleInterval()Minimum milliseconds between two measurements of the same UI, so a burst of interactions costs one tree walk rather than one per event.One measurement walks the whole component tree of one UI while its session lock is held, so the work this setting bounds is proportional to tree size times interaction rate: on a grid-heavy application with many concurrent users, a short interval adds measurable time to the lock that
vaadin.session.lock.holdreports. The gauges describe a capacity trend rather than a live value, so the default is deliberately coarse.- Returns:
- the per-UI sampling interval in milliseconds
-
getUiStateBytesPerNode
public int getUiStateBytesPerNode()Bytes to attribute to one state-tree node when publishingvaadin.ui.state.size, or0to publish no byte figure at all.There is no default value that would be right: nodes are a proxy for retained heap, not a measurement of it, and one
Gridnode backed by 100 000 rows counts as a single node. Measure the cost for the application at hand — settle the heap, build a number of copies of a representative view, keep them reachable, and read the difference — and set the result here. Left at zero, the gauge is not registered, because a guessed byte figure published as a metric is worse than a missing one.- Returns:
- bytes per state-tree node, or
0when not configured
-
getUiStateGrowthSamples
public int getUiStateGrowthSamples()How many measurements in a row a collection held by a view has to grow in before it is reported as growing, or0to not read the collections views hold at all.A view that keeps what it loads in a field — every refresh appended to a list, every result cached in a map — grows on the heap while its component tree stays the same size, so none of the state-tree gauges move. When this is above zero, each UI measurement also reads the sizes of the collections its views hold in their own fields, and a field whose size went up at this many measurements without once going down is counted in
vaadin.ui.state.retained.growing. A measurement where the size stayed the same neither counts nor breaks the run, because measurements follow interactions, not the code that adds to the field.Some collections legitimately grow for a while — a chat log, rows a user keeps adding — so a higher value trades a later signal for fewer of those. Only takes effect when
isUiState()is on.- Returns:
- measurements of growth before a collection is reported, or
0when collections are not read
-
getInsightsCapacity
public int getInsightsCapacity()Maximum number of records retained for the insights endpoint, applied to each buffer rather than shared between them: interactions, data provider queries and browser errors are retained separately, so with all three collectors active the total is three times this value. Keeping them apart means a burst of slow queries cannot evict the failed interactions, and neither can the flood of buffered reports that arrives when a network outage ends.- Returns:
- the per-buffer capacity
-