camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburkhardt <>
Subject best practice for logging execution time
Date Fri, 17 Sep 2010 17:23:17 GMT

Title is a little weird as I didn't quite know the proper way to phrase this.

I'm interested in logging the duration of certain things, such as how long
it takes the file component to read or write a file, how long it takes the
jms component to publish or consume a message, etc.
As an example, my first instinct was to extend the JmsProducer class and add
a start() and stop() call to a timer class in the doSend function.  This
would certainly have the intended effect, but doing this for each and every
component I want metrics on would be tedious to say the least.

Is there a simpler, general way to achieve this in camel?  I've taken a
brief look at the Tracer and Interceptor and don't see quite how I'd be able
to use them to log execution times of individual components.  Perhaps I'm
missing something.  I would love to be able to do this all from Spring DSL
and keep the actual Java code to a minimum but I realize that may be wishful
Any help would be appreciated.
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message