We actually have an operator which does this, however it will be deprecated (we 
don't want it in core Akka, and it will be moved out to a "contrib" package).

You can enable it via 
    import akka.stream.extra.Implicits.TimedFlowDsl

See here to learn how to use it: 
https://github.com/akka/akka/blob/v2.4.4/akka-stream-tests/src/test/scala/akka/stream/extra/FlowTimedSpec.scala

As I said, it will be deprecated and removed, so you can copy it to your 
project instead of depending on the one in Akka.

It's one simple file: 
https://github.com/akka/akka/blob/v2.4.4/akka-stream/src/main/scala/akka/stream/extra/Timed.scala



-- 
Konrad `ktoso` Malawski
Akka @ Lightbend

On 5 May 2016 at 20:49:25, Kinshuk Bairagi (kinshuk1...@gmail.com) wrote:

Hi

Is there any way how we can know the time taken for each message to pass 
through a given flow ?

Our use-case is that we need to monitor the api-response times of few http 
server's which we call via `Http().cachedHostConnectionPoolHttps`, 
`Http().superPool` which are essentially flow's and set up alert's when the 
response time of this servers starts to deteriorate. 

Any suggestions please?

Regards
Kinshuk Bairagi
 
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to