http4s / blaze

Blazing fast NIO microframework and Http Parser
Apache License 2.0
350 stars 63 forks source link

Real clients and server can emit metrics #60

Open bryce-anderson opened 7 years ago

bryce-anderson commented 7 years ago

The session contains much of the important information that folks need in the context of metrics, so blaze should have some level of abstraction to facilitate this.

rossabaker commented 7 years ago

Abstracting metrics has been on my mind a lot lately. It's relatively easy to maintain counters and gauges that can be output by other systems. Histograms and load averages and other things that involve buckets or exponential decay is where one gets into reinventing Dropwizard, Prometheus, etc.

This is a problem I'd like to solve in blaze and http4s.

bryce-anderson commented 7 years ago

👍 All the activity in http4s proper is what inspired this.

rossabaker commented 7 years ago

Prior art: go-kit has a metrics abstraction. I either don't understand it or don't like it: with N metrics, one would need to pass in N parameters.

I wonder about a typeclass for metric registries that knows how to create the abstractions. Although that could be tricky when it comes to things like choosing appropriate buckets for a Prometheus histogram.