Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add typesafe wrappers for prom client metrics (#5969)
https://linear.app/unleash/issue/2-1856/add-typesafe-wrappers-over-prom-clients-metrics As discussed on the latest knowledge sharing session, this adds typesafe wrappers over prom client's metrics, requiring us to specify all the configured labels for each metric. This uses a functional approach and only exposes the methods that are currently relevant to us, while also exposing the underlying instance of the metric for an easy access if needed. Since we often chain `labels` with `inc` in counters, this adds a convenience `increment` method for counters which does both in a single call.
- Loading branch information