camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: best practice for logging execution time
Date Sat, 18 Sep 2010 16:57:42 GMT
Yeah you can use EventNotifier and listen on ExchangeSentEvent's which
has the time recorded as well.

On Fri, Sep 17, 2010 at 7:23 PM, jburkhardt <> wrote:
> 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
> thinking.
> Any help would be appreciated.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message