Skip to content

OTel dependency convergence issue #819

@rayusagi

Description

@rayusagi

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 of opentelemetry-instrumentation-api-semconv dependency instead of 1.33.3-alpha, so that io.opentelemetry:opentelemetry-api-incubator are in both cases in 1.37.0-alpha
  • to use the 1.38.0 version of opentelemetry-sdk dependency instead of 1.37.0 so that io.opentelemetry:opentelemetry-api-incubator are in both cases in 1.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA general bugrelease notesNoteworthy change to call out in the release notes

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions