Docs

Configuring Observability Kit

How to configure Observability Kit and what its default settings are.

Every feature of Observability Kit is enabled by default, so most applications need no configuration at all. When you do 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

vaadin.observability.* properties in application.properties (or any Spring property source).

Plain Spring

The same vaadin.observability.* keys, read with @Value.

Standalone

An ObservabilitySettings instance, built with its builder and passed to ObservabilityKit.install().

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
# Turn the whole kit off
vaadin.observability.enabled=false

# Or toggle individual feature groups
vaadin.observability.client=false
vaadin.observability.traces=false

The full set of properties:

Property Default Description

vaadin.observability.enabled

true

Master switch for the auto-configuration. Spring Boot only.

vaadin.observability.sessions

true

Session count, lifetime, and lock metrics.

vaadin.observability.uis

true

UI count metrics.

vaadin.observability.navigation

true

Navigation timing.

vaadin.observability.requests

true

Server-side request and RPC timing.

vaadin.observability.errors

true

Error counters.

vaadin.observability.client

true

Browser-side timing collected from the client.

vaadin.observability.traces

true

Emit tracing spans through the Observation API.

vaadin.observability.traces-session-id

false

Include the session ID as a span attribute.

vaadin.observability.route-cardinality-limit

200

Maximum number of distinct route tag values before they collapse to _other.

vaadin.observability.client-rate-per-session

100

Maximum number of client-side samples accepted per session, as a throttling guard.

Plain Spring

In a plain-Spring (non-Boot) application, the same feature-toggle keys are read with @Value, so you set them the same way in your property source. The vaadin.observability.enabled master switch is specific to the Spring Boot auto-configuration; to disable the kit in plain Spring, don’t import ObservabilityConfiguration.

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.

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().

What the Features Control

The feature toggles map directly to the built-in meters and spans:

Feature What it records

sessions

Active session gauge, session-created counter, session-lifetime timer, and session-lock wait/hold timers.

uis

Active UI gauge and UI-created counter.

navigation

Server-side navigation timing, tagged by route and outcome.

requests

Server-side request and RPC timing.

errors

Server-side error counter, tagged by exception.

client

Browser-observed timing — bootstrap, navigation, server round trip, Web Vitals, and client errors.

traces

Tracing spans for the request lifecycle, navigation, and RPC, emitted through the Observation API.

For the exact meter and span names produced by each feature, see the Reference page.

27B2E4EF-7AF3-41F8-9CFF-928963337D56

Updated