Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Opt-in default shared registry #801
In #334, it was mentioned that the default metric registry has disappeared. While it makes sense to disallow a "default" default registry to prevent having a dumping ground for all metrics, this unfortunately creates a bit more complexity for multilayered services. If there's a shared registry of metrics between them, for instance, each of the pieces that make up a service would need to be cognisant of this default registry's name, even if the name has no semantic meaning.
In order to reduce complexity, we are aiming to expose a method to set a default registry name and allow consumers to call into SharedMetricRegistries to access this default registry. This enables a single orchestrator (such as a service container) to initialize the default registry with whatever name is suitable, leaving other pieces to just call SharedMetricRegistries.getDefault() in order to access this default registry.
This comes with a couple of caveats obviously:
Tests are written. I'll add them to the pull request once this implementation code is reviewed.