Currently, the Aggregator constructs a prometheus registry rather than accepting one as a parameter introducing some friction when trying to use the same registry in the RPC/REST servers.
New Behavior
We lift the construction of the registry to main and pass it as a parameter to whatever requires it.
Breaking Changes
No breaking changes since this is merely a refactor.
Observations
There is a bit of an implicit assumption that if config.EnableMetrics == true then the registry provided as parameter is not nil.
Current Behavior
Currently, the Aggregator constructs a prometheus registry rather than accepting one as a parameter introducing some friction when trying to use the same registry in the RPC/REST servers.
New Behavior
We lift the construction of the registry to
main
and pass it as a parameter to whatever requires it.Breaking Changes
No breaking changes since this is merely a refactor.
Observations
There is a bit of an implicit assumption that if
config.EnableMetrics == true
then the registry provided as parameter is notnil
.