Skip to content

V2.0.0

Compare
Choose a tag to compare
@deadtrickster deadtrickster released this 09 Sep 17:15
· 57 commits to master since this release

Breaking change:

All observe_duration/track_inprogress functions no longer do implicit fun execution.

def track_checked_out_sockets(checkout_fun) do
  Gauge.track_inprogress([name: :my_pool_checked_out], checkout_fun)
end

has to be rewritten as

def track_checked_out_sockets(checkout_fun) do
  Gauge.track_inprogress([name: :my_pool_checked_out], checkout_fun.())
end

Counter

New helper macros:

  • count_exceptions [with optional Exception type]
  • count_no_exceptions

Metrics

Metrics can be created declaratively:

@histogram [name: :http_request_duration_milliseconds,
            labels: [:method],
            buckets: [100, 300, 500, 750, 1000],
            help: "Http Request execution time"]

when used, __declare_prometheus_metrics__/0 will be auto-generated.