Tracing apache camel route with Jaeger Tracing apache camel route with Jaeger kubernetes kubernetes

Tracing apache camel route with Jaeger


What I eventually did is create a JaegerTraces and annotated with Bean


Apache Camel doesn't provide an implementation of OpenTracing, so you have to add also an implementation to your dependencies. For example Jaeger.

Maven POM:

    <dependency>        <groupId>org.apache.camel.springboot</groupId>        <artifactId>camel-opentracing-starter</artifactId>        <version>${camel.version}</version>    </dependency>    <dependency>        <groupId>io.opentracing.contrib</groupId>        <artifactId>opentracing-spring-jaeger-starter</artifactId>        <version>3.2.2</version>    </dependency>

Also you have to enable OpenTracing for Apache Camel on your Spring Boot application class, see Spring Boot:

If you are using Spring Boot then you can add the camel-opentracing-starter dependency, and turn on OpenTracing by annotating the main class with @CamelOpenTracing.

The Tracer will be implicitly obtained from the camel context’s Registry, or the ServiceLoader, unless a Tracer bean has been defined by the application.

Spring Boot application class:

@SpringBootApplication@CamelOpenTracingpublic class CamelApplication {    public static void main(String[] args) {        SpringApplication.run(CamelApplication.class, args);    }}