zio / zio-metrics-legacy

⛔️ DEPRECATED
https://zio.github.io/zio-metrics
Apache License 2.0
56 stars 39 forks source link

add Counter/Gauge/Timer/Histogram traits to core zio-metrics jar #120

Open pjfanning opened 2 years ago

pjfanning commented 2 years ago

These dropwizard and prometheus metrics have very similar APIs but they don't share a super class (or interface/trait). From an object oriented programming perspective, it would be nice to have a shared Counter trait (as one example).

trait CounterMetric {
  def inc(): Task[Unit]
  def inc(amount: Double): Task[Unit]
}