Configuring Observability Kit
Everything that instruments ordinary request handling is enabled by default, so most applications need no configuration at all.
Four groups of features are opt-in: the two that reach beyond ordinary request handling — UI state size and database monitoring — and the two that would add sensitive or high-cardinality detail to what leaves the application, database-statement and insights-details.
When you need to turn features off or tune them, how you configure the kit depends on how it’s set up.
| Setup | How to configure |
|---|---|
Spring Boot starter |
|
Plain Spring | Most of the same |
Standalone | An |
|
Note
| Configuration covers only the kit’s own instrumentation. Service identity (service name and resource attributes) and metric export are part of your Micrometer and Spring Boot Actuator setup, not the kit — see Export the Metrics. |
Spring Boot Properties
With the Spring Boot starter, configure the kit through vaadin.observability.* properties:
Source code
application.properties
application.properties# Turn the whole kit off
vaadin.observability.enabled=false
# Or toggle individual feature groups
vaadin.observability.client=false
vaadin.observability.traces=falseThe full set of properties:
| Property | Default | Description |
|---|---|---|
|
| Master switch for the auto-configuration. Spring Boot only. |
|
| Session count, lifetime, and lock metrics. |
|
| UI count metrics. |
|
| Per-UI state size: how much component-tree state the server holds for live users. Opt-in, because it costs a tree walk that ordinary request handling doesn’t. See UI State Size. |
|
| Navigation timing. |
|
| Server-side request and RPC timing. |
|
| Data provider count and fetch query timing, plus the page sizes lazy-loading components ask for. |
|
| Error counters. |
|
| Browser-side timing, errors, and connection state collected from the client. |
|
| Count client message resends, client-requested resynchronizations, and messages with an unexpected ID. |
|
| Wrap |
|
| Attach the parameterized SQL as |
|
| Maximum number of |
|
| Emit tracing spans through the Observation API. |
|
| Include the HTTP session ID as the |
|
| Retain failed and over-budget user interactions, and the errors browsers report, for the insights endpoint.
Failures also need |
|
| Allow retained interactions to carry the exception message, the top stack frames, and the raw session ID, and retained browser errors their message and function name. Off by default, since the insights payload is meant to be forwarded. For a browser error it governs collection rather than only retention, and is read by a page when it loads. |
|
| Maximum number of retained records, applied to each buffer rather than shared.
Interactions, data provider queries, and browser errors are retained separately, so with all three active the total is three times this.
The oldest is evicted once a buffer’s cap is reached.
At most |
|
| Maximum number of distinct |
|
| Client-sample throttling guard: the maximum number of browser samples accepted per session in each ten-second window.
All tabs of a session share the budget.
Samples beyond it are rejected and counted in |
|
| Minimum milliseconds between two measurements of the same UI.
One measurement walks that UI’s whole component tree under its session lock, so this is the knob that bounds the cost of |
|
| Bytes per state-tree node, used to project |
|
| Number of measurements a collection held in a view field has to grow in, without shrinking, before it’s reported as growing.
|
Values outside the allowed range of a numeric property are rejected at startup with an IllegalArgumentException, rather than silently clamped.
Plain Spring
In a plain-Spring (non-Boot) application, ObservabilityConfiguration reads every vaadin.observability.* key from the Spring Environment, so you set them the same way in your property source and the defaults match the Spring Boot ones.
The vaadin.observability.enabled master switch is the exception: it’s specific to the Boot auto-configuration.
To disable the kit in plain Spring, don’t import ObservabilityConfiguration.
The database keys — vaadin.observability.database, vaadin.observability.database-statement, and vaadin.observability.database-span-limit — have no effect outside Spring Boot.
Database monitoring wraps the DataSource beans through a Boot bean post-processor, so it’s available only with the starter.
See the Getting Started page for the plain-Spring setup.
Standalone
In a standalone (non-Spring) deployment, build an ObservabilitySettings instance and pass it to ObservabilityKit.install().
Each builder method matches one of the properties above, except that the database toggles have no effect here: wrapping the DataSource beans is Spring Boot work.
Source code
Java
ObservabilitySettings settings = ObservabilitySettings.builder()
.client(false)
.traces(false)
.routeCardinalityLimit(500)
.build();
ObservabilityKit.install(meterRegistry, settings);For standalone no enabled flag exists; to disable the kit, don’t call install().
This two-argument overload creates an ObservationRegistry internally — but only when traces is left on — and doesn’t expose it.
To use your own, which you need for exporting spans or for writing custom Observations, pass it explicitly; see Standalone (Without Spring).
What the Features Control
The feature toggles map directly to the built-in meters and spans:
| Feature | What it records |
|---|---|
| Active session gauge, session-created counter, session-lifetime timer, and session-lock wait/hold timers. |
| Active UI gauge and UI-created counter. |
| Aggregate gauges of retained UI state — state-tree nodes, components, and views, as totals and per-UI and per-session maxima — and of the collections views hold in their own fields.
With |
| Server-side navigation timing, tagged by route, outcome, and error. |
| Server-side request and RPC timing. |
| Data provider count and fetch query timing, and the items each fetch asked for against what it returned. Also gates the data query insights. |
| Server-side error counter, tagged by exception, route, and component. Also decorates the session error handler, which is what makes the failures Flow routes there countable and attributable to a component. |
| Browser-observed signals — bootstrap, navigation, UIDL request and rendering, and Web Vitals timing, client errors, and connection-state transitions with their downtime. |
| A counter of client message resends, client-requested resynchronizations, and messages with an unexpected ID, tagged by type. |
| JDBC result-set row counts per route, the SQL work behind slow data query insights, and, when tracing is on, a span per query. Spring Boot starter only, off by default. |
| Tracing spans for the request lifecycle, navigation, RPC, executor tasks, data provider queries, and — with database monitoring on — JDBC queries, emitted through the Observation API. |
| Retained failed and over-budget interactions, data provider queries, and browser errors, and — with |
For the exact meter and span names produced by each feature, see the Reference page.
27B2E4EF-7AF3-41F8-9CFF-928963337D56