use of org.apache.camel.CamelContext in project camel by apache.
the class ZipkinOneRouteFallbackScribe method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
zipkin = new ZipkinTracer();
// no service so should use fallback naming style
// we do not want to trace any direct endpoints
zipkin.addExcludePattern("direct:*");
zipkin.setIncludeMessageBody(true);
zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
// attaching ourself to CamelContext
zipkin.init(context);
return context;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class ZipkinOneRouteScribe method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
zipkin = new ZipkinTracer();
// we have one route as service
zipkin.addClientServiceMapping("seda:cat", "cat");
zipkin.addServerServiceMapping("seda:cat", "cat");
zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
// attaching ourself to CamelContext
zipkin.init(context);
return context;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class ZipkinSimpleRouteScribe method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
zipkin = new ZipkinTracer();
// we have one route as service
zipkin.addClientServiceMapping("seda:dude", "dude");
zipkin.addServerServiceMapping("seda:dude", "dude");
zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
// attaching ourself to CamelContext
zipkin.init(context);
return context;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class ZipkinTwoRouteScribe method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
zipkin = new ZipkinTracer();
// we have 2 routes as services
zipkin.addClientServiceMapping("seda:cat", "cat");
zipkin.addServerServiceMapping("seda:cat", "cat");
zipkin.addClientServiceMapping("seda:dog", "dog");
zipkin.addServerServiceMapping("seda:dog", "dog");
// capture message body as well
zipkin.setIncludeMessageBody(true);
zipkin.setSpanCollector(new ScribeSpanCollector(ip, 9410));
// attaching ourself to CamelContext
zipkin.init(context);
return context;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class CamelContextCompleter method complete.
public int complete(Session session, CommandLine commandLine, List<String> candidates) {
try {
StringsCompleter delegate = new StringsCompleter();
List<CamelContext> camelContexts = getLocalCamelContexts();
for (CamelContext camelContext : camelContexts) {
delegate.getStrings().add(camelContext.getName());
}
return delegate.complete(session, commandLine, candidates);
} catch (Exception e) {
// nothing to do, no completion
}
return 0;
}
Aggregations