Akka flow monitoring

I am looking for some examples of akka streams monitoring.

eg. If have a graph like below -

source ~> transformBlah ~> transformBlahToBlah1 ~> partition.in
partition.out(0) ~> // simulation of partition.out(1) flow here
partition.out(1) ~> ... stages ~> Sink.ignore

Currently to watch stages I use flow.log, however I’d like to see an example of flow.monitor and how is it useful in monitoring streams if possible, any suggestions? documentation of flow monitor seems very sparse.

Could we clarify what you mean by “monitor a stream”? I think we may be looking at the wrong thing (monitor operator), just by conflation of names, rather than use case you’re looking after? So, what exactly do you want to know / see when you say “watch a stage” (which log is totally the right thing to use there).

To me monitoring means “metrics” and potentially the tracing stuff is sometimes thrown into the same bucket; Akka Streams monitoring will soon land in https://developer.lightbend.com/docs/cinnamon/latest/introduction/overview/features.html though it’s sadly not out yet.

You want to just print out elements? That’s what log is for.

the .monitor() operator also exists but it’s for randomly “peeking into” the stream at a given point in it from the outside. It’s not really a “monitoring” thing, more like a window/monitor that allows you to peek at the element currently at that point in the stream.

I see thanks for clarifying - Actually I was confusing this monitor with “logging” - I discovered logging and I was happy …

I see, got it :slight_smile:

Thanks for moving the question here; I was not able to collect the core of the question on the chat… too much other discussions between :)