Bertrand Renuart
Bertrand Renuart

Reputation: 1638

Spring Sleuth integration for Apache Camel

Is there any Sleuth integration for Apache Camel in the wild? (with support for not only the correlation id but also the Span stuff)

Upvotes: 4

Views: 3324

Answers (4)

Taras Danylchuk
Taras Danylchuk

Reputation: 128

As an option this lib could be used - https://github.com/Playtika/sleuth-camel Just including this dependency will do the job. Basically it will wrap all your camel routes in spring context with Spring Sleuth interceptors.

So in case you have 2 services connecting to each other via some camel route as a result you will have next trace on zipkin: enter image description here

Upvotes: 1

Available as of Camel 2.18

The camel-zipkin component is used for tracing and timing incoming and outgoing Camel messages using zipkin. Events (span) are captured for incoming and outgoing messages being sent to/from Camel.

To enable camel-zipkin you need to configure first:

ZipkinTracer zipkin = new ZipkinTracer();

// Configure the scribe span collector with the hostname and port for the Zipkin Collector Server 
zipkin.setSpanCollector(new ScribeSpanCollector("192.168.90.100", 9410);

// ...then add zipkin to the CamelContext
zipkin.init(camelContext);

This will the trace all incoming and outgoing messages in Camel routes.

More info here: http://camel.apache.org/camel-zipkin

Upvotes: 0

charlb
charlb

Reputation: 1249

I created a spring-cloud-sleuth-camel library for spring boot applications. Just add to the classpath.

Upvotes: 4

Marcin Grzejszczak
Marcin Grzejszczak

Reputation: 11189

I've done sth like this in the micro-infra-spring project - https://github.com/4finance/micro-infra-spring/tree/master/micro-infra-camel/src/main/java/com/ofg/infrastructure/camel . Since I'm no longer maintaining it I can't really say if it's still working properly. You can take that code and check it out yourself :P

Upvotes: 0

Related Questions