Tracing extension AutoConfiguration

Hello,

I started using Axon tracing extension as written in reference guide: https://docs.axoniq.io/reference-guide/extensions/tracing

But as I found, default command and query gateway is always used, because AxonAutoConfiguration goes first, and defaultCommandGateway is created there. So tracingCommandGateway in TracingAutoConfiguration is ignored.

Is something more needed to configure? Or where could I make a mistake?

Thanks

Hi Lukas,
welcome to the community.

axon-tracing-spring-boot-autoconfigure should take care automatically set up correctly what it is needed.
Are you using jaeger OpenTracing implementation or others?

Sharing your dependency file and some code snipped could help to figure out what is going on.

Yes, I use Jaeger and this (Axon related) maven dependencies:

<dependency>
    <groupId>org.axonframework</groupId>
    <artifactId>axon-spring-boot-starter</artifactId>
</dependency>        
<dependency>
    <groupId>org.axonframework.extensions.tracing</groupId>
    <artifactId>axon-tracing-spring-boot-starter</artifactId>
</dependency>
<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-spring-cloud-starter</artifactId>
</dependency>
<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-spring-jaeger-web-starter</artifactId>
</dependency>

Hi @votrluk, let me try to help on this one.

Recently another user reported something similar on out extension-kafka here.
Essentially, the AutoConfiguration of any extension should happen before the
default InfraConfiguration from the Framework, which creates all default needed Beans (when missing).

I’ve opened an issue on our repo for that.

I believe that, to have your project working, you can define in your classpath a /META-INF/spring.factories with the AutoConfigurations you want, on the right order. Check the official documentation for more help.