-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Since version 1.3.1
, there is a dependency convergence error when trying to use the io.micrometer:micrometer-tracing-bridge-otel
dependency :
+-<my_module>
+-io.micrometer:micrometer-tracing-bridge-otel:jar:1.3.1:compile
+-io.opentelemetry:opentelemetry-sdk:jar:1.37.0:compile
+-io.opentelemetry:opentelemetry-sdk-metrics:jar:1.37.0:compile
+-io.opentelemetry:opentelemetry-api-incubator:jar:1.37.0-alpha:runtime
and
+-<my_module>
+-io.micrometer:micrometer-tracing-bridge-otel:jar:1.3.1:compile
+-io.opentelemetry:opentelemetry-sdk:jar:1.37.0:compile
+-io.opentelemetry:opentelemetry-sdk-logs:jar:1.37.0:compile
+-io.opentelemetry:opentelemetry-api-incubator:jar:1.37.0-alpha:runtime
and
+-<my_module>
+-io.micrometer:micrometer-tracing-bridge-otel:jar:1.3.1:compile
+-io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv:jar:1.33.3-alpha:compile
+-io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:jar:1.33.3:compile
+-io.opentelemetry:opentelemetry-api-incubator:jar:1.38.0-alpha:runtime
and
+-<my_module>
+-io.micrometer:micrometer-tracing-bridge-otel:jar:1.3.1:compile
+-io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv:jar:1.33.3-alpha:compile
+-io.opentelemetry:opentelemetry-api-incubator:jar:1.38.0-alpha:runtime
io.opentelemetry:opentelemetry-api-incubator
is present both in 1.37-0-alpha
and 1.38.0-alpha
through different dependency paths.
It seems the problem appeared since version 1.3.1
as I do not reproduce it when using version 1.3.0
.
It is still present on the latest 1.3.3
version.
For projects using enforcer plugins, this is inconvenient as it forces to downgrade the version of the dependency (which is, in my case, managed by Spring Boot), or to exclude/include one of the transitive dependency. Unfortunately, neither option is ideal.
The solution would be either :
- to use the
1.33.2-alpha
version ofopentelemetry-instrumentation-api-semconv
dependency instead of1.33.3-alpha
, so thatio.opentelemetry:opentelemetry-api-incubator
are in both cases in1.37.0-alpha
- to use the
1.38.0
version ofopentelemetry-sdk
dependency instead of1.37.0
so thatio.opentelemetry:opentelemetry-api-incubator
are in both cases in1.38.0-alpha
Also, it might be a good idea to introduce such enforcer plugin on the project so that it doesn't happen again in the future.