paypal / squbs

Akka Streams & Akka HTTP for Large-Scale Production Deployments
http://paypal.github.io/squbs
Apache License 2.0
1.43k stars 237 forks source link

Max value for incoming http connections should be captured via `MaterializationMetricsCollector` #680

Open anilgursel opened 6 years ago

anilgursel commented 6 years ago

Currently, we see active, created, terminated rates. But, having a max would be useful as well, which we had in the past.

akara commented 6 years ago

I'm looking into this issue. We can implement it in the MaterializationMetricsCollector. But IMO this should not be an issue for MaterializationMetricsCollector but rather in the JmxReporter.

anilgursel commented 6 years ago

The active, created and terminated are three separate metrics and independent from JmxReporter's view. Not sure, how can that be achieved that way.

akara commented 6 years ago

These three are totally independent counters. created and terminated only get incremented. Max is always the current value. active gets incremented and decremented. This is where the max makes sense. But considering the concurrency on this metrics, what is even a reliable way to obtain a max short of putting another lock around both increment and max?

anilgursel commented 6 years ago

It is best effort. It can be another gauge or counter that shows the max of active ever reached.

akara commented 6 years ago

That's exactly what I mean, should derivation of the max be a separate counter, or should it be the monitoring infrastructure?

anilgursel commented 6 years ago

If Jmx Reporter already has the capability, I think we can utilize that, or potentially use a different metric that also keeps track of the max.