The feature was included presuming the PerDbNameStatsdDataFactory
was a required use case.
Static labels supported a use case that we no longer consider good
practice and was likely bug-ridden.
For more information, see linked bug.
Bug: T359436
Change-Id: I60c497727fdae493c3bb18de3bd1a4db338132cc
This patch introduced a new method `newNull()` which will return an
instance of a Null StatsFactory for code that wants to fallback to a
valid (light-weight compatible) default.
NOTE: Updated tests to use the new code and as a TODO, ObjectCache will
need this in a follow-up patch.
Bug: T356251
Change-Id: I9efcce04c127af8633eca792e63b1f0dad6696a0
BREAKING INTERFACE CHANGE
* getMetric() (and all subtypes) now only require a $name.
* Labels are added dynamically and order enforced by BaseMetric labelKeys.
* Metric component is now defined in the service instance.
* Remove InvalidLabelsException.
* Make addLabelKey() private.
* Removed unused functions.
* NullMetric to return $this - support builder pattern.
* Update tests.
Bug: T240685
Change-Id: Id8cb62ec74907cb54dc39b6a228a230eed0c957d