Packages
org.springframework.boot.actuate.autoconfigure.logging.opentelemetryorg.springframework.boot.actuate.autoconfigure.logging.opentelemetry.otlporg.springframework.boot.actuate.autoconfigure.metrics.export.otlporg.springframework.boot.actuate.autoconfigure.opentelemetryorg.springframework.boot.actuate.autoconfigure.opentelemetry.otlporg.springframework.boot.actuate.autoconfigure.tracing.otlp
Properties
management.otlp.logging.compressionmanagement.otlp.logging.endpointmanagement.otlp.logging.headers.*management.otlp.logging.timeoutmanagement.otlp.metrics.export.aggregation-temporalitymanagement.otlp.metrics.export.base-time-unitmanagement.otlp.metrics.export.batch-sizemanagement.otlp.metrics.export.connect-timeoutmanagement.otlp.metrics.export.enabledmanagement.otlp.metrics.export.headers.*management.otlp.metrics.export.read-timeoutmanagement.otlp.metrics.export.stepmanagement.otlp.metrics.export.urlmanagement.otlp.tracing.compressionmanagement.otlp.tracing.endpointmanagement.otlp.tracing.headers.*management.otlp.tracing.timeoutmanagement.otlp.tracing.transport
Connection Details
OtlpLoggingConnectionDetailsgetUrl(Transport)(management.otlp.logging.endpoint)OtlpMetricsConnectionDetailsgetUrl()(management.otlp.metrics.export.url)OtlpTracingConnectionDetailsgetUrl(Transport)(management.otlp.tracing.endpoint)
Comment From: wilkinsona
We should keep this consistency review in mind when working on:
-
41213
-
41324
-
41333
-
41991
Comment From: mhalbritter
I got something started here: https://github.com/mhalbritter/spring-boot/tree/mh/41460-review-opentelemetry-and-otlp-support-for-consistency
It moves the stuff under org.springframework.boot.actuate.autoconfigure.logging.opentelemetry to org.springframework.boot.actuate.autoconfigure.logging and the stuff under org.springframework.boot.actuate.autoconfigure.logging.opentelemetry.otlp to org.springframework.boot.actuate.autoconfigure.logging.otlp.
The package structure is now the same as for tracing.
The properties for tracing and logging look consistent too (management.otlp.tracing.transport has no logging equivalent (yet)).
Comment From: mhalbritter
management.otlp.metrics.export.url is inconsistent. Most of the other export URLs are named uri, e.g. management.datadog.metrics.export.uri.
The underlying method on OtlpConfig is called url().
We could either fix that to be consistent to the other metrics properties (management.otlp.metrics.export.uri) or to be consistent to the other OTLP properties (management.otlp.metrics.export.endpoint).
Comment From: mhalbritter
We could add read-timeout and connect-timeout to our tracing and logging properties to make them consistent to the metrics properties.
Right now, management.otlp.logging.timeout and management.otlp.tracing.timeout call setTimeout on the Otel builder, and the JavaDoc says:
Sets the maximum time to wait for the collector to process an exported batch of spans.
which lead me to think that this is the read timeout. There's also a setConnectTimeout on the builders.
Comment From: mhalbritter
Regarding org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp: not sure if otlp is good under opentelemetry or if we should move it to org.springframework.boot.actuate.autoconfigure.otlp.
Comment From: mhalbritter
I don't see a way to add transport or compression to management.otlp.metrics.export. They configure the underlying OtlpMeterRegistry and this only supports gRPC over http and doesn't compress anything.
Comment From: mhalbritter
Regarding the read and connect timeout: While we can add connect timeout properties to OtlpLoggingProperties and OtlpTracingProperties (which call .setConnectTimeout on the OtlpExporterBuilder), supporting read timeout is not possible.
The method we call at the moment, .setTimeout, delegates at the end to OkHttpClient.Builder.callTimeout, which is the time for "resolving DNS, connecting, writing the request body, server processing, as well as reading the response body.".
There's no method to set the read timeout.
Comment From: mhalbritter
After a refactoring, it now looks like this:
org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp is gone. The Transport and Compression enums have been copied to metrics and logging directly.
Logging
- OpenTelemetry specific classes in
org.springframework.boot.actuate.autoconfigure.logging - OTLP specific classes in
org.springframework.boot.actuate.autoconfigure.logging.otlp
Properties
From org.springframework.boot.actuate.autoconfigure.logging.otlp.OtlpLoggingProperties
management.otlp.logging.compressionmanagement.otlp.logging.connect-timeoutmanagement.otlp.logging.endpointmanagement.otlp.logging.headers.*management.otlp.logging.timeoutmanagement.otlp.logging.transport
Metrics
OTLP classes in org.springframework.boot.actuate.autoconfigure.metrics.export.otlp
Properties
From org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsProperties
management.otlp.metrics.export.aggregation-temporalitymanagement.otlp.metrics.export.base-time-unitmanagement.otlp.metrics.export.batch-sizemanagement.otlp.metrics.export.connect-timeoutmanagement.otlp.metrics.export.enabledmanagement.otlp.metrics.export.headers.*management.otlp.metrics.export.read-timeoutmanagement.otlp.metrics.export.stepmanagement.otlp.metrics.export.url
Tracing
- OpenTelemetry specific classes in
org.springframework.boot.actuate.autoconfigure.tracing - OTLP specific classes in
org.springframework.boot.actuate.autoconfigure.tracing.otlp
Properties
From org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingProperties
management.otlp.tracing.compressionmanagement.otlp.tracing.connect-timeoutmanagement.otlp.tracing.endpointmanagement.otlp.tracing.export.enabledmanagement.otlp.tracing.headers.*management.otlp.tracing.timeoutmanagement.otlp.tracing.transport
I've also renamed org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpAutoConfiguration to OtlpTracingAutoConfiguration.