Documentation

Documentation versions (currently viewingVaadin 24)

Configuring Observability Kit

Instructions on how to configure Observability Kit and what are the default settings.

Instrumentation can be configured in the agent.properties file that’s used with the Java agent.

Service Configuration

The service attributes are used to differentiate traces from services or applications which might have many instances running simultaneously, such as horizontally scaled services.

The service attributes are as follows:

  • service.name is an attribute that’s used to distinguish a service by name. The default value is vaadin — the only attribute with a default value. It’s also the only one required.

  • service.namespace helps to distinguish a group of services.

  • service.instance.id helps to distinguish instances of the same service that exist at the same time. This must be unique for each instance of the same service.namespace, service.name pair.

  • service.version is the semantic versioning string of the service version.

The service.name attribute is configured using the otel.service.name property, either in the agent.properties configuration file as a system property, or as an environment variable.

Add the following line to the agent.properties file:

otel.service.name=myapp

Other service attributes are configured using the otel.resource.attributes property, either in the agent.properties configuration file as a system property, or as en environment variable. Multiple attributes are separated by commas.

Add the following line to the agent.properties file:

otel.resource.attributes=service.namespace=myservices,service.instance.id=myapp-eu

For more information about service configuration, see the OpenTelemetry documentation.

Default OpenTelemetry Instrumentation

The custom distribution disables default OpenTelemetry instrumentation for Vaadin and servlets.

The default instrumentation is disabled because a single-page Vaadin application logging all requests wasn’t helpful, although it generated plenty of data. It was disabled to have control over which requests generate a trace.

The instrumentation modules that are disabled by default are: jetty, servlet, and tomcat. To enable any of these, add the following line to the agent.properties file:

otel.instrumentation.${instrumentationName}.enabled=true