Search in sources :

Example 11 with ZipkinTracer

use of org.apache.camel.zipkin.ZipkinTracer in project camel by apache.

the class ClientApplication method setupCamel.

public void setupCamel(@Observes CamelContextStartingEvent event) {
    // create zipkin
    ZipkinTracer zipkin = new ZipkinTracer();
    zipkin.setHostName("192.168.99.100");
    zipkin.setPort(9410);
    zipkin.addClientServiceMapping("http://localhost:9090/service1", "service1");
    // capture 100% of all the events
    zipkin.setRate(1.0f);
    // include message bodies in the traces (not recommended for production)
    zipkin.setIncludeMessageBodyStreams(true);
    // register zipkin to CamelContext
    zipkin.init(event.getContext());
}
Also used : ZipkinTracer(org.apache.camel.zipkin.ZipkinTracer)

Aggregations

ZipkinTracer (org.apache.camel.zipkin.ZipkinTracer)11 CamelContext (org.apache.camel.CamelContext)8 ScribeSpanCollector (com.github.kristofa.brave.scribe.ScribeSpanCollector)7 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1