OpenTelemetry Instrumentation
Arconia OpenTelemetry supports instrumentation for Spring Boot applications in two ways:
-
Micrometer Instrumentation. Micrometer provides APIs for instrumenting Java applications, including
Observation,MeterRegistry, andTracer. Most libraries in the Spring and Java ecosystems are already instrumented with Micrometer. Arconia OpenTelemetry includes a bridge between Micrometer and OpenTelemetry, allowing you to export metrics and traces to OpenTelemetry. -
OpenTelemetry Java Instrumentation. OpenTelemetry provides a set of instrumentation libraries for Java applications.
You can instrument your applications either by using the Micrometer APIs or the OpenTelemetry APIs. The choice depends on your requirements and the libraries you are using.
| The OpenTelemetry Java Agent is not supported by Arconia OpenTelemetry. If you’d like to continue using the Agent, check out the OpenTelemetry Buildpack for adding it to your application out-of-the-box. |
Micrometer Instrumentation
Micrometer-based instrumentation is recommended by the Spring Boot project, and it can be customized via the usual Spring Boot facilities. Check out the Micrometer and Spring Boot documentation for more information.
There are three types of instrumentation you can find in the libraries from the Spring ecosystem:
-
Metrics instrumentation using the
MeterRegistryAPI. In Arconia, such metrics are automatically bridged and exported to OpenTelemetry (either via the Micrometer Metrics Registry OTLP or the Micrometer Metrics OpenTelemetry Bridge). -
Traces instrumentation using the
TracerAPI. In Arconia, such traces are automatically bridged and exported to OpenTelemetry (via the Micrometer Tracing OpenTelemetry Bridge). -
Unified instrumentation using the
ObservationAPI, which results in both metrics and traced being generated. In Arconia, both of them are automatically bridged and exported to OpenTelemetry.
The Observation API is the recommended way to instrument your applications, as it provides a unified way to generate observability signals and offers great flexibility since it decouples the capturing of contextual information from the actual generation of telemetry data.
| Micrometer-based instrumentation follows its own semantic conventions, which have been stable for a long time and are safe to use in production. It doesn’t completely follow the OpenTelemetry Semantic Conventions, though it’s possible to switch to them in some cases. Arconia will provide configuration options in the future to let you choose which semantic conventions to use for Micrometer-based instrumentation. |
OpenTelemetry Instrumentation
The OpenTelemetry Java Instrumentation project provides a set of libraries that automatically instrument your Java applications to generate telemetry data. Arconia OpenTelemetry doesn’t use any of them by default, but it provides the necessary setup to let you easily add them to your project and use them. Check out the OpenTelemetry documentation for more information.
| OpenTelemetry-based instrumentation follows the OpenTelemetry Semantic Conventions, including those that are still experimental and subject to change. Care should be taken, as they might change in a non-backward-compatible way in the future without notice. Furthermore, some instrumentation libraries might still be experimental and not yet stable, so they might change in a non-backward-compatible way in the future without notice. Always check the documentation of the specific instrumentation library you are using for more information on its stability and compatibility. |