Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Tracer per route without explicitly turning off tracing

$
0
0
Hi,

I am using Camel 2.12.1 .
I would like to enable tracing for one route only.
The example from

https://fisheye6.atlassian.com/browse/camel-git/camel-core/src/test/java/org/apache/camel/processor/TracePerRouteTest.java?r=2c295f02f7868cca60ed98a55b490083d2695a2a

shows how to enable tracing for route A, C only :

public void configure() throws Exception {

Tracer tracer = new Tracer();

tracer.setDestinationUri("mock:traced");

tracer.setLogName("foo");

context.addInterceptStrategy(tracer);

// route A
from("direct:a").to("mock:a");

// route B
from("direct:b").noTracing().to("mock:b");

// route C
from("direct:c").tracing().to("mock:c");

According to the above example, if I want to enable tracing for route X, say, the following steps are required.
1) Add a tracer to the context.
2) Enable tracing for route X.
3) Disable tracing (add noTracing) for other routes.

Is there a way of avoid adding noTracing to routes that requires no tracing, but still make tracing turn off for these routes ?
I only want tracing on route X.

Thanks in advance for any assistance!

Shing Hing Man

Viewing all articles
Browse latest Browse all 5648

Latest Images

Trending Articles



Latest Images