3

In spring boot 2 it was possible to disable distributed tracing during development as described here. Locally, traces were still generated but not exported.

In spring boot 3 it is possible it disable tracing at all with:

     management.tracing.enabled=false

How can I disable the zipkin reporter or distributed tracing in spring boot 3 but keep local tracing on?

pero_hero
  • 2,881
  • 3
  • 10
  • 24

4 Answers4

3

Maybe by setting this property to 0.0?

management.tracing.sampling.probability: 0.0
lzafra
  • 91
  • 2
1

This seems to be removed in Spring Boot 3 with Micrometer. It was used to be available in spring-cloud-sleuth.

Anyone see any other alternative?

vivek_vara
  • 51
  • 3
0

Check and remove this dependency

<dependency>
    <groupId>io.zipkin.reporter2</groupId>
    <artifactId>zipkin-reporter-brave</artifactId>
</dependency>

or any other reporter dependency...

Guillaume
  • 466
  • 5
  • 19
0

If you have zipkin in your classpath you can use:

@SpringBootApplication(exclude = ZipkinAutoConfiguration.class)

This will disable reporter that tries to access http://localhost:9411/api/v2/spans . Sadly, based on https://github.com/spring-projects/spring-boot/issues/34620 , there is no dedicated management.tracing.zipkin.enabled and there isn't going to be one.

user158037
  • 2,659
  • 1
  • 24
  • 27