Deprecate metrics.Default
AlexanderYastrebov opened this issue · 0 comments
AlexanderYastrebov commented
Is your feature request related to a problem? Please describe.
There are quite a few places that rely on global metrics.Default variable
Lines 199 to 202 in 0ce11b9
This is a bad design which is not thread-safe and complicates tests, e.g.:
Lines 19 to 24 in 0ce11b9
Describe the solution you would like
Components that update metrics receive metrics instance via configuration.
First we may refactor components to make metrics configurable and fallback to metrics.Default for backwards compatibility.
Then deprecate and later remove metrics.Default
completely.
Would you like to work on it?
Yes