Search in sources :

Example 6 with ScribeSpanCollector

use of com.github.kristofa.brave.scribe.ScribeSpanCollector in project camel by apache.

the class ZipkinABCRouteScribe method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    zipkin = new ZipkinTracer();
    zipkin.addClientServiceMapping("seda:a", "a");
    zipkin.addClientServiceMapping("seda:b", "b");
    zipkin.addClientServiceMapping("seda:c", "c");
    zipkin.addServerServiceMapping("seda:a", "a");
    zipkin.addServerServiceMapping("seda:b", "b");
    zipkin.addServerServiceMapping("seda:c", "c");
    zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
    // attaching ourself to CamelContext
    zipkin.init(context);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext) ScribeSpanCollector(com.github.kristofa.brave.scribe.ScribeSpanCollector) ZipkinTracer(org.apache.camel.zipkin.ZipkinTracer)

Example 7 with ScribeSpanCollector

use of com.github.kristofa.brave.scribe.ScribeSpanCollector in project camel by apache.

the class ZipkinTimerRouteScribe method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    zipkin = new ZipkinTracer();
    // we have one route as service
    zipkin.addClientServiceMapping("seda:timer", "timer");
    zipkin.addServerServiceMapping("seda:timer", "timer");
    zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
    // attaching ourself to CamelContext
    zipkin.init(context);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext) ScribeSpanCollector(com.github.kristofa.brave.scribe.ScribeSpanCollector) ZipkinTracer(org.apache.camel.zipkin.ZipkinTracer)

Example 8 with ScribeSpanCollector

use of com.github.kristofa.brave.scribe.ScribeSpanCollector in project camel by apache.

the class ZipkinMulticastRouteScribe method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    zipkin = new ZipkinTracer();
    zipkin.addClientServiceMapping("seda:a", "a");
    zipkin.addClientServiceMapping("seda:b", "b");
    zipkin.addClientServiceMapping("seda:c", "c");
    zipkin.addServerServiceMapping("seda:a", "a");
    zipkin.addServerServiceMapping("seda:b", "b");
    zipkin.addServerServiceMapping("seda:c", "c");
    zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
    // attaching ourself to CamelContext
    zipkin.init(context);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext) ScribeSpanCollector(com.github.kristofa.brave.scribe.ScribeSpanCollector) ZipkinTracer(org.apache.camel.zipkin.ZipkinTracer)

Aggregations

ScribeSpanCollector (com.github.kristofa.brave.scribe.ScribeSpanCollector)8 CamelContext (org.apache.camel.CamelContext)7 ZipkinTracer (org.apache.camel.zipkin.ZipkinTracer)7 SpanCollector (com.github.kristofa.brave.SpanCollector)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Endpoint (org.apache.camel.Endpoint)1 ServiceHostPropertiesFunction (org.apache.camel.component.properties.ServiceHostPropertiesFunction)1 ServicePortPropertiesFunction (org.apache.camel.component.properties.ServicePortPropertiesFunction)1