OpenTelemetry Traces
Enabling/Disabling Traces
Support for OpenTelemetry Traces is enabled by default. You can disable it via configuration properties.
-
YAML
-
Properties
arconia:
otel:
traces:
enabled: false
arconia.otel.traces.enabled=false
Configuration Properties
You can configure the support for OpenTelemetry Traces via configuration properties.
Sampling
How to sample traces.
| Property | Default | Description |
|---|---|---|
|
|
How to sample traces. Options: |
|
|
The probability ratio for sampling a span. Used when the sampling strategy is |
Propagation
Arconia OpenTelemetry relies on the Spring Boot support for Micrometer Tracing for configuring propagation. For convenience, its configuration properties are included here.
The tracing context is propagated whatever the type of traces exporter, including none, so that an application that doesn’t export traces still continues the traces of the services it calls and is called by.
| For more information, refer to the Micrometer Tracing and Spring Boot Actuator documentation. |
| Property | Default | Description |
|---|---|---|
|
- |
Tracing context propagation types produced and consumed by the application. Setting this property overrides the more fine-grained propagation type properties. |
|
|
Tracing context propagation types produced by the application. |
|
|
Tracing context propagation types consumed by the application. |
Baggage
Arconia OpenTelemetry relies on the Spring Boot support for Micrometer Tracing for configuring baggage management. For convenience, its configuration properties are included here.
| For more information, refer to the Micrometer Tracing and Spring Boot Actuator documentation. |
| Property | Default | Description |
|---|---|---|
|
|
Whether to enable Micrometer Tracing baggage propagation. |
|
|
Whether to enable correlation of the baggage context with logging contexts. |
|
- |
List of fields that should be correlated with the logging context. That means that these fields would end up as key-value pairs in e.g. MDC. |
|
- |
List of fields that are referenced the same in-process as it is on the wire. For example, the field "x-vcap-request-id" would be set as-is including the prefix. |
|
- |
List of fields that should automatically become tags. |
Span Limits
Constraints for the data captured by spans.
| Property | Default | Description |
|---|---|---|
|
- |
Maximum length of each attribute value. |
|
|
Maximum number of attributes per span. |
|
|
Maximum number of attributes per event. |
|
|
Maximum number of attributes per link. |
|
|
Maximum number of events per span. |
|
|
Maximum number of links per span. |
Span Processor
Configuration for the batch span processor.
| Property | Default | Description |
|---|---|---|
|
|
Whether to export unsampled spans. |
|
|
The maximum allowed time to export spans. |
|
|
The maximum number of spans to export in a single batch. |
|
|
The maximum number of spans that can be queued before batching. |
|
|
Whether to generate metrics for the span processor. The metrics follow the OpenTelemetry Semantic Conventions for SDK metrics ( |
|
|
The interval between two consecutive exports. |
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.
Programmatic Configuration
You can further customize the auto-configured SdkTracerProvider instance via the OpenTelemetryTracerProviderBuilderCustomizer API.
@FunctionalInterface
public interface OpenTelemetryTracerProviderBuilderCustomizer {
void customize(SdkTracerProviderBuilder builder);
}
Disabling the Auto-Configuration
The auto-configuration provided by Arconia for OpenTelemetry Traces is enabled by default, but you can disable it as explained in the Enabling/Disabling Traces section.
If you define a custom SdkTracerProvider bean, the auto-configuration will back off, and your custom bean will be used instead.
@Configuration(proxyBeanMethods = false)
public class MyTracingConfiguration {
@Bean
public SdkTracerProvider myTracerProvider() {
...
}
}
Exporting Traces
By default, traces are enabled and exported via OTLP, but you can change the type of exporter globally or specifically for traces. If you set the exporter type to none, the corresponding signal will be disabled from exporting.
| If a value is not provided specifically for traces, the value configured for the general exporter is used. |
| Property | Default | Description |
|---|---|---|
|
|
The type of OpenTelemetry exporter to use for observability signals. Options: |
|
- |
The type of OpenTelemetry exporter to use for traces. Options: |
| For more information on exporting traces to the console, refer to Console Exporter. |
OTLP
When traces are exported via OTLP (default behavior), you can configure the following properties.
| If a value is not provided specifically for traces, the value configured for the general OTLP export is used, if available. See OTLP. |
| Property | Default | Description |
|---|---|---|
|
|
Compression type to use for OTLP requests. Options: |
|
|
The maximum waiting time for the exporter to establish a connection to the endpoint. |
|
|
The endpoint to which telemetry data will be sent. |
|
- |
Additional headers to include in each request to the endpoint. |
|
|
Whether to generate metrics for the exporter itself. The metrics follow the OpenTelemetry Semantic Conventions for SDK metrics ( |
|
|
Transport protocol to use for OTLP requests. Options: |
|
- |
Host of the proxy. The port must be set together with it. |
|
- |
Port of the proxy, between 1 and 65535. Required when the host is set. |
|
- |
Name of the SSL bundle to use for the connection to the OTLP endpoint. |
|
|
The maximum waiting time for the exporter to send each telemetry batch. |
|
|
Maximum number of attempts, including the original request. Must be between 2 and 5. |
|
|
Initial backoff time. |
|
|
Maximum backoff time. |
|
|
Backoff multiplier. |
| The default OTLP exporter uses HTTP/Protobuf. If you’d like to use gRPC, refer to OTLP gRPC. |
Micrometer Tracing Support
Spring libraries and many other libraries from the Java ecosystem are instrumented using Micrometer Tracing (via the Micrometer Observation API) and rely on Micrometer for context propagation and baggage management. Arconia supports the Micrometer Tracing OpenTelemetry Bridge from the Micrometer Tracing project to export such traces via OpenTelemetry.
Micrometer Tracing Bridge (from Micrometer)
The Arconia OpenTelemetry Spring Boot Starter comes built-in with the Micrometer Tracing OpenTelemetry Bridge provided by the Micrometer Tracing project, which transparently converts Micrometer traces into OpenTelemetry Traces going through the OpenTelemetry API.
Disabling the bridge is not a supported configuration option, since Micrometer Tracing is a core part of the OpenTelemetry tracing support in Spring Boot.