Arconia OpenTelemetry

Arconia OpenTelemetry simplifies observability for Spring Boot applications by combining the standardization of OpenTelemetry with the robustness of Micrometer to deliver a unified solution that covers all your telemetry needs.

Need to collect, process, and export logs, metrics, and traces from your Spring Boot applications? Add the Arconia OpenTelemetry Spring Boot Starter to your project and get everything you need in one dependency.

Observability is not just for production. If you’re looking to enhance your development and testing experience, Arconia Dev Services offers a zero-code and zero-config integration with Grafana LGTM, providing a complete OpenTelemetry observability platform right in your development environment.

If you’re currently using OpenTelemetry Spring Boot Starter or Spring Boot OpenTelemetry/OTLP, check out our Migration Guides for a seamless migration to Arconia OpenTelemetry.

Quick Start

Let’s see how you can get started with Arconia OpenTelemetry in your Spring Boot application.

You can refer to our sample application for a minimal example of how Arconia OpenTelemetry works.

Dependencies

If you already have a Spring Boot application and want to add OpenTelemetry support, you can add the Arconia OpenTelemetry Spring Boot Starter dependency to your project. This will automatically configure OpenTelemetry and Micrometer for you.

  • Gradle

  • Maven

dependencies {
    implementation 'io.arconia:arconia-opentelemetry-spring-boot-starter'
}
<dependency>
    <groupId>io.arconia</groupId>
    <artifactId>arconia-opentelemetry-spring-boot-starter</artifactId>
</dependency>

Arconia publishes a BOM (Bill of Materials) that you can use to manage the version of the Arconia libraries. It is highly recommended to use the BOM to ensure that all dependencies are compatible.

  • Gradle

  • Maven

dependencyManagement {
	imports {
		mavenBom "io.arconia:arconia-bom:0.32.0"
	}
}
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.arconia</groupId>
            <artifactId>arconia-bom</artifactId>
            <version>0.32.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Dev Services

Arconia Dev Services streamline your development workflow by automatically provisioning external services your application depends on during development and testing. No manual setup is required.

With Arconia OpenTelemetry, you can leverage the Grafana LGTM Dev Service to automatically start a complete Grafana observability platform based on OpenTelemetry, allowing you to visualize and explore your application’s telemetry data during development and testing.

To enable the Grafana LGTM Dev Service, add the following dependency to your project:

  • Gradle

  • Maven

dependencies {
    testAndDevelopmentOnly "io.arconia:arconia-dev-services-lgtm"
}
<dependency>
    <groupId>io.arconia</groupId>
    <artifactId>arconia-dev-services-lgtm</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>
Other OpenTelemetry dev services are available. Refer to Arconia Dev Services for all options.

Running the Application

You can run your Spring Boot application using your preferred method.

  • Gradle

  • Maven

  • CLI

./gradlew bootRun
./mvnw spring-boot:run
arconia dev

If you have enabled the Grafana LGTM Dev Service, Arconia will automatically start a Grafana instance pre-configured to accept OpenTelemetry logs, metrics, and traces from your application when running in development or test mode.

By default, when running the application in development mode, the Grafana LGTM Dev Service is shared across multiple applications running simultaneously, so that you can have a single observability platform for all your applications running in your development environment.

The application logs will show you the URL where you can access the Grafana observability platform and start exploring your application’s telemetry data.

...i.a.d.s.startup  : Dev Service 'lgtm' is ready in container <container-id> (grafana/otel-lgtm, localhost:<port>)
...i.a.d.s.startup  : Dev Service 'lgtm' links: Grafana: http://localhost:<port>, OTLP/HTTP: http://localhost:<port>, OTLP/gRPC: http://localhost:<port>, Prometheus: http://localhost:<port>, Tempo MCP: http://localhost:<port>/api/mcp
Learn more about the Grafana LGTM Dev Service in the dedicated documentation.

Enabling/Disabling Telemetry

The Arconia OpenTelemetry Spring Boot Starter provides sensible defaults for configuring observability signals. By default, logs, metrics, and traces are enabled and exported via OTLP to an OpenTelemetry-compatible backend.

You can disable individual observability signals or even disable the entire OpenTelemetry support via configuration properties.

Table 1. Observability Signals Configuration Properties
Property Default Description

arconia.otel.enabled

true

Whether OpenTelemetry support should be enabled.

arconia.otel.logs.enabled

true

Whether support for OpenTelemetry logs is enabled.

arconia.otel.metrics.enabled

true

Whether support for OpenTelemetry metrics is enabled.

arconia.otel.traces.enabled

true

Whether support for OpenTelemetry traces is enabled.

Exporting Telemetry

By default, all observability signals are exported via OTLP. If you set the exporter type to none, the observability signals will be disabled from exporting.

Table 2. Exporter Type Configuration Properties
Property Default Description

arconia.otel.exporter.type

otlp

The type of OpenTelemetry exporter to use for observability signals. Options: console, otlp, none.

arconia.otel.exporter.memory-mode

reusable-data

Whether to reuse objects to reduce allocation or work with immutable data structures. Options: reusable-data, immutable-data.

You can change the type of the exporter in use for each observability signal using the arconia.otel.<signal>.exporter.type property, where <signal> is one of logs, metrics, or traces.

Table 3. Specific Exporter Type Configuration Properties
Property Default Description

arconia.otel.logs.exporter.type

(inherited from arconia.otel.exporter.type)

The type of OpenTelemetry exporter to use for logs. Options: console, otlp, none.

arconia.otel.metrics.exporter.type

(inherited from arconia.otel.exporter.type)

The type of OpenTelemetry exporter to use for metrics. Options: console, otlp, none.

arconia.otel.traces.exporter.type

(inherited from arconia.otel.exporter.type)

The type of OpenTelemetry exporter to use for traces. Options: console, otlp, none.

OTLP

Global properties are available to configure the OTLP exporters for logs, metrics, and traces.

Table 4. OTLP Exporter Configuration Properties
Property Default Description

arconia.otel.exporter.otlp.compression

gzip

Compression type to use for OTLP requests. Options: none, gzip.

arconia.otel.exporter.otlp.connect-timeout

10s

The maximum waiting time for the exporter to establish a connection to the endpoint.

arconia.otel.exporter.otlp.endpoint

http://localhost:4317 (gRPC) or http://localhost:4318 (HTTP)

The endpoint to which telemetry data will be sent.

arconia.otel.exporter.otlp.headers

-

Additional headers to include in each request to the endpoint.

arconia.otel.exporter.otlp.metrics

false

Whether to generate metrics for the exporter itself. The metrics follow the OpenTelemetry Semantic Conventions for SDK metrics (otel.sdk.*), which are still in development.

arconia.otel.exporter.otlp.protocol

http-protobuf

Transport protocol to use for OTLP requests. Options: grpc, http-protobuf.

arconia.otel.exporter.otlp.proxy.host

-

Host of the proxy. The port must be set together with it.

arconia.otel.exporter.otlp.proxy.port

-

Port of the proxy, between 1 and 65535. Required when the host is set.

arconia.otel.exporter.otlp.ssl.bundle

-

Name of the SSL bundle to use for the connection to the OTLP endpoint.

arconia.otel.exporter.otlp.timeout

10s

The maximum waiting time for the exporter to send each telemetry batch.

arconia.otel.exporter.otlp.retry.max-attempts

5

Maximum number of attempts, including the original request. Must be between 2 and 5.

arconia.otel.exporter.otlp.retry.backoff-config.first-backoff

1s

Initial backoff time.

arconia.otel.exporter.otlp.retry.backoff-config.max-backoff

5s

Maximum backoff time.

arconia.otel.exporter.otlp.retry.backoff-config.multiplier

1.5

Backoff multiplier.

You can override any of these properties for each observability signal using the arconia.otel.<signal>.exporter.otlp.* prefix, where <signal> is one of logs, metrics, or traces. A property that isn’t set for a signal falls back to the common one. Headers are merged instead: the headers set for a signal are added to the common ones, replacing a common header with the same name.

With HTTP/Protobuf, the common endpoint is the base URL, to which each exporter appends the path of its signal, such as /v1/traces. An endpoint set for a signal is used as it is. With gRPC, the endpoint is always used as it is. For more details, refer to the dedicated documentation for Logs, Metrics, and Traces.

HTTP

By default, the OTLP exporters use HTTP/Protobuf. The Arconia OpenTelemetry Spring Boot Starter includes the arconia-opentelemetry-exporter-sender-http module, which sends the telemetry data to the endpoint with the JDK HTTP Client over HTTP/1.1. Every OTLP endpoint supports HTTP/1.1, while the requests to upgrade the connection to HTTP/2 are rejected by many servers and proxies (opentelemetry-java#8982). The Micrometer Metrics Registry OTLP connects to the endpoint the same way.

The JDK HTTP Client doesn’t accept some host names, such as the ones with an underscore, so the application fails to start when an OTLP endpoint uses one. Use another name, such as a network alias, or another sender.

When virtual threads are enabled with the spring.threads.virtual.enabled property, the HTTP/Protobuf exporters, the metrics reader, and the Micrometer Metrics Registry OTLP use virtual threads.

You can use another sender provided by the OpenTelemetry project instead, such as the one based on OkHttp, by excluding the Arconia sender and adding the other one.

  • Gradle

  • Maven

dependencies {
    implementation('io.arconia:arconia-opentelemetry-spring-boot-starter') {
        exclude group: 'io.arconia', module: 'arconia-opentelemetry-exporter-sender-http'
    }
    runtimeOnly 'io.opentelemetry:opentelemetry-exporter-sender-okhttp'
}
<dependency>
    <groupId>io.arconia</groupId>
    <artifactId>arconia-opentelemetry-spring-boot-starter</artifactId>
    <exclusions>
        <exclusion>
            <groupId>io.arconia</groupId>
            <artifactId>arconia-opentelemetry-exporter-sender-http</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>io.opentelemetry</groupId>
    <artifactId>opentelemetry-exporter-sender-okhttp</artifactId>
    <scope>runtime</scope>
</dependency>

When more than one sender is on the classpath, the OpenTelemetry SDK logs a warning and uses one of them. You can choose which one by setting the io.opentelemetry.sdk.common.export.HttpSenderProvider JVM system property to the fully qualified class name of its provider, such as io.opentelemetry.exporter.sender.okhttp.internal.OkHttpHttpSenderProvider.

gRPC

You can switch to gRPC by changing the arconia.otel.exporter.otlp.protocol property to grpc. Additionally, you need to add the following dependency:

  • Gradle

  • Maven

dependencies {
    implementation "io.opentelemetry:opentelemetry-exporter-sender-grpc-managed-channel"
}
<dependency>
    <groupId>io.opentelemetry</groupId>
    <artifactId>opentelemetry-exporter-sender-grpc-managed-channel</artifactId>
</dependency>

The opentelemetry-exporter-sender-grpc-managed-channel requires a transport implementation among the ones provided by the grpc-java project. The grpc-netty-shaded dependency is one choice, but you can use any other gRPC transport implementation that fits your needs. Arconia doesn’t manage this dependency for you, so make sure to include it in your project and specify a version. The OpenTelemetry project doesn’t provide any guidance on which version of grpc-java to use. Our recommendation is to use the latest 1.x version.

  • Gradle

  • Maven

dependencies {
    runtimeOnly "io.grpc:grpc-netty-shaded:{version}"
}
<dependency>
    <groupId>io.grpc</groupId>
    <artifactId>grpc-netty-shaded</artifactId>
    <version>{version}</version>
</dependency>
The Micrometer Metrics Registry OTLP included in the Arconia OpenTelemetry Spring Boot Starter only supports HTTP/Protobuf. When switching to gRPC, keep exporting metrics via HTTP/Protobuf by setting arconia.otel.metrics.exporter.otlp.protocol to http-protobuf, or replace the registry with the Micrometer Metrics Support.

TLS

To secure the connection to the OTLP endpoint with TLS, use an https endpoint. The certificates trusted by the JVM are used by default. To trust a different certificate authority, or to authenticate the application with a client certificate, configure a Spring Boot SSL bundle and reference it by name.

  • YAML

  • Properties

spring:
  ssl:
    bundle:
      pem:
        otlp:
          truststore:
            certificate: "file:/etc/otel/ca.crt"
arconia:
  otel:
    exporter:
      otlp:
        endpoint: https://otel-collector:4318
        ssl:
          bundle: otlp
spring.ssl.bundle.pem.otlp.truststore.certificate=file:/etc/otel/ca.crt
arconia.otel.exporter.otlp.endpoint=https://otel-collector:4318
arconia.otel.exporter.otlp.ssl.bundle=otlp

The SSL bundle applies to the OTLP exporters of all signals and to the Micrometer Metrics Registry OTLP. You can use a different SSL bundle for a signal with the arconia.otel.<signal>.exporter.otlp.ssl.bundle property. The TLS protocols enabled by the SSL bundle apply to all the exporters, while its ciphers only apply to the Micrometer Metrics Registry OTLP, since the OpenTelemetry SDK doesn’t support configuring them.

The OTEL_EXPORTER_OTLP_CERTIFICATE, OTEL_EXPORTER_OTLP_CLIENT_KEY, and OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE environment variables configure an SSL bundle named otel-exporter-otlp from the given PEM files and use it for the OTLP exporters. Their signal-specific variants, such as OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE, configure an SSL bundle named otel-exporter-otlp-<signal>, taking the files they don’t set from the general variables. The client key and the client certificate must be set together. The OTEL_EXPORTER_OTLP_INSECURE variables are not supported, since the scheme of the endpoint determines whether TLS is used.

Proxy

The OTLP exporters connect to the endpoint through the proxy configured for the JVM, if any, such as with the standard https.proxyHost, https.proxyPort, and http.nonProxyHosts system properties. You can configure a proxy for the OTLP exporters explicitly instead.

  • YAML

  • Properties

arconia:
  otel:
    exporter:
      otlp:
        proxy:
          host: proxy.example.com
          port: 3128
arconia.otel.exporter.otlp.proxy.host=proxy.example.com
arconia.otel.exporter.otlp.proxy.port=3128

The proxy applies to the OTLP exporters of all signals and to the Micrometer Metrics Registry OTLP. You can use a different proxy for a signal with the arconia.otel.<signal>.exporter.otlp.proxy.* properties. Proxies are only supported with HTTP/Protobuf, so the application fails to start if a proxy is configured explicitly for an exporter using gRPC. Proxy authentication is not supported.

Console

Instead of OTLP, you can use the console exporter to print the telemetry data to the console. This is useful for debugging and testing purposes. Besides setting the exporter type to console for the observability signals you want to export, you also need to add the following dependency:

  • Gradle

  • Maven

dependencies {
    implementation "io.opentelemetry:opentelemetry-exporter-logging"
}
<dependency>
    <groupId>io.opentelemetry</groupId>
    <artifactId>opentelemetry-exporter-logging</artifactId>
</dependency>
This exporter option is not recommended for production.
The console exporter doesn’t support exporting metrics defined using the Micrometer APIs when using the Micrometer Metrics Registry OTLP module instead of the Micrometer Metrics OpenTelemetry Bridge.

OpenTelemetry Environment Variables

Arconia supports the OpenTelemetry Environment Variable Specification for configuring the OpenTelemetry integration. If both the OpenTelemetry Environment Variables and the Arconia configuration properties are set, the OpenTelemetry Environment Variables will take precedence.

This support is especially useful during deployment, where you can use the same set of standard environment variables to configure OpenTelemetry across different languages and frameworks.

You can disable this support by setting the arconia.otel.compatibility.environment-variable-specification configuration property to false.

Comparisons

Arconia provides unified observability for Spring Boot applications, combining full support for OpenTelemetry API, SDK, and Instrumentation with full support for Micrometer API and Instrumentation. The goal is to provide a single, unified observability solution for Spring Boot applications that can give you the best of both worlds: the standardization and ubiquity of OpenTelemetry and the robustness and stability of Micrometer.

Arconia provides full support for OpenTelemetry and Micrometer

The main reason why Arconia OpenTelemetry exists is that no other option provides this level of integration and support for both OpenTelemetry and Micrometer in a single, unified solution. This section compares Arconia OpenTelemetry with other solutions available in the Spring Boot ecosystem (see the comparison table below).

Table 5. Differences between Arconia OpenTelemetry and other solutions
Aspect Arconia OpenTelemetry Spring Boot 3.5 Spring Boot 4.0 Spring Boot 4.1 Spring Boot 4.2 OpenTelemetry Spring Boot Starter

OpenTelemetry Logging API

✅

✅

✅

✅

✅

✅

OpenTelemetry Metrics API

✅

❌

❌

❌

❌

✅

OpenTelemetry Tracing API

✅

✅

✅

✅

✅

✅

Logback Logging Bridge for OpenTelemetry API

✅

❌

❌

❌

❌

✅

Log4J2 Logging Bridge for OpenTelemetry API

🚧

❌

❌

❌

❌

✅

Micrometer Metrics Bridge for OpenTelemetry API

✅

❌

❌

❌

❌

✅

Micrometer Tracing Bridge for OpenTelemetry API

✅

✅

✅

✅

✅

❌

OpenTelemetry OTLP Logs Exporter

✅

✅

✅

✅

✅

✅

OpenTelemetry OTLP Metrics Exporter

✅

❌

❌

❌

❌

✅

OpenTelemetry OTLP Traces Exporter

✅

✅

✅

✅

✅

✅

OpenTelemetry Environment Variables

✅

⚠️*

⚠️*

✅

✅

✅

Micrometer Metrics OTLP Exporter

✅

✅

✅

✅

✅

❌

OpenTelemetry Java Instrumentation

🔶

❌

❌

❌

❌

✅

Micrometer Instrumentation

✅

✅

✅

✅

✅

❌

Single Dependency

✅

❌

⚠️**

⚠️**

⚠️**

✅

Spring Boot Conventional Patterns

✅

✅

✅

✅

✅

⚠️*

Dev Services for Observability Backends

✅

❌

❌

❌

❌

❌

Testcontainers Service Connections

✅

✅

✅

✅

✅

❌

Docker Compose Service Connections

❌

✅

✅

✅

✅

❌

Maintained by the Spring team

❌

✅

✅

✅

✅

❌

  • 🚧 Support is under development and coming soon.

  • 🔶 When both Micrometer and OpenTelemetry Java instrumentation available, only the Micrometer one is included.

  • ⚠️* Only a subset is supported.

  • ⚠️** Single dependency, but still with partial support for OpenTelemetry, so you’ll need to add more dependencies yourself.

Arconia OpenTelemetry vs Spring Boot OpenTelemetry

The Spring Boot project provides observability based on Micrometer with partial support for exporting telemetry for OpenTelemetry.

For logs, it supports the OpenTelemetry Logging API, but no bridges are provided to reuse existing logging instrumentation. For traces, it supports the OpenTelemetry Tracing API via a bridge from Micrometer Tracing.

For metrics, Spring Boot doesn’t provide support for the OpenTelemetry Metrics API. Instead, it offers an option to export Micrometer metrics via OTLP using the Micrometer Metrics Registry OTLP module.

A key difference between Arconia OpenTelemetry and Spring Boot is that the latter doesn’t provide full support for OpenTelemetry APIs and SDKs. Spring Boot supports the OpenTelemetry environment variables since version 4.1.

In particular, by not supporting the OpenTelemetry Metrics API, Spring Boot misses out on the ability to collect metrics using the standard OpenTelemetry APIs and instrumentation, which some Java libraries use. Additionally, configuration for each observability signal is segregated rather than unified under a single OpenTelemetry configuration model to benefit from consistency and common defaults across all signals.

At development and test time, Spring Boot connects the application to the Grafana LGTM and OpenTelemetry Collector containers you define with Testcontainers or Docker Compose. Arconia provides Dev Services that start Grafana LGTM, the OpenTelemetry Collector, Phoenix, OpenLIT, or Langfuse with no configuration, and Testcontainers service connections for the same backends. Docker Compose service connections for observability backends are not supported yet.

Arconia OpenTelemetry vs OpenTelemetry Spring Boot Starter

The OpenTelemetry Spring Boot Starter is built on top of the OpenTelemetry Java SDK and Instrumentation libraries. It provides support for OpenTelemetry APIs and SDKs, including logging, metrics, and tracing.

A key difference between Arconia OpenTelemetry and the OpenTelemetry Spring Boot Starter is that the latter doesn’t reuse most of the existing, stable Micrometer instrumentation available across the Spring and Java ecosystem. Each Spring library comes with built-in instrumentation based on the Micrometer Observation API, implemented and maintained by the same authors.

By not reusing the existing Micrometer instrumentation, the OpenTelemetry Spring Boot Starter misses out on a significant amount of telemetry data, which needs to be implemented and maintained separately by the OpenTelemetry community. That may also lead to compatibility issues whenever new Spring Boot versions are released.

Additionally, the configuration model is not as streamlined as you’d expect from a Spring Boot library, primarily due to the use of an auto-configuration design specific to the OpenTelemetry Java SDK, which doesn’t always follow the usual Spring Boot conventions.

Finally, it doesn’t offer support for Spring Boot development-time services, such as Testcontainers or Docker Compose, which makes the local development and testing experience less convenient.