I recently upgraded to springboot v3.3, after which the app is failing during startup. Service is hosted on gcp. Error:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[zipkin2.reporter.AsyncReporter]: Factory method 'stackdriverReporter' threw exception with message: Receiver class
zipkin2.reporter.stackdriver.StackdriverSender does not define or inherit an implementation of the resolved method 'abstract zipkin2.reporter.Encoding encoding()' 
of interface zipkin2.reporter.BytesMessageSender.
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
    ... 142 common frames omitted
Caused by: java.lang.AbstractMethodError: Receiver class zipkin2.reporter.stackdriver.StackdriverSender 
does not define or inherit an implementation of the resolved method 'abstract zipkin2.reporter.Encoding encoding()' 
of interface zipkin2.reporter.BytesMessageSender.
    at zipkin2.reporter.AsyncReporter$Builder.<init>(AsyncReporter.java:104)
    at zipkin2.reporter.AsyncReporter.builder(AsyncReporter.java:64)
    at zipkin2.reporter.AsyncReporter.builder(AsyncReporter.java:59)
    at com.google.cloud.spring.autoconfigure.trace.StackdriverTraceAutoConfiguration.stackdriverReporter(StackdriverTraceAutoConfiguration.java:178)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
    ... 143 common frames omitted

I am using following tracing dependencies:

  implementation 'com.google.cloud:spring-cloud-gcp-starter-trace:5.3.0'
  implementation 'io.micrometer:micrometer-tracing-bridge-brave:1.3.0'
  implementation 'com.google.cloud:spring-cloud-gcp-starter-metrics':5.3.0

Any idea on why this might be happening ?

Comment From: mhalbritter

Looks like spring-cloud-gcp-starter-trace is using Brave 5. They need to update it to Brave 6.

Comment From: codefromthecrypt

Spring Boot 3.3+ should always use Zipkin reporter 3.x.: the path as suggested by @mhalbritter is correct. Upgrade to Brave 6 decouples you from zipkin-reporter versions, but boot has its own reporter code which uses 3.x.

Edge cases are mostly about older releases which themselves embed 2.x reporter code, or extensions which haven't yet migrated or pin versions.

For example, Spring Cloud Sleuth has Zipkin reporter 2.x classes, so while it can use Brave 6, it can never use Reporter 3, as there are no planned releases of sleuth anymore.

https://github.com/openzipkin/brave-example/blob/master/webflux5-sleuth/pom.xml#L28-L30