Skip to content

SpringBootApplication can't start up with otel-javaagent v1.15.0 with opentelemetry-samplers.jar #6234

Answered by laurit
bgong-mdsol asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like you have shaded opentelemetry-api in both boot loader and under inst/ (where it shouldn't be). Try adding implementation("io.opentelemetry.contrib:opentelemetry-samplers:1.15.0-alpha") to custom/build.gradle also in the same file add

    dependencies {
      exclude(dependency("io.opentelemetry:opentelemetry-api"))
      exclude(dependency("io.opentelemetry:opentelemetry-context"))
      exclude(dependency("io.opentelemetry:opentelemetry-semconv"))
    }

inside shadowJar. Hopefully this way you'll get classes from opentelemetry-samplers in inst/ and won't get the classes that are supposed to be in boot loader.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bgong-mdsol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants