camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
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.
http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html



On Fri, Sep 17, 2010 at 7:23 PM, jburkhardt <jburkhardt@gmail.com> 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: http://camel.465427.n5.nabble.com/best-practice-for-logging-execution-time-tp2844045p2844045.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message