Commit 98d3617
authored
Allow providing a custom MetricsFactory to Counter and friends (#172)
### Motivation:
To allow for things like parallel testing, it'd be useful if we can
explicitly provide a MetricsFactory to the existing Counter/... types.
### Modifications:
Added a `factory: MetricsFactory` parameter to all the initializers of
Counter/... types, and kept the existing methods that continue to
default to `MetricsSystem.factory`.
### Result:
Adopters can use a custom MetricsFactory explicitly passed in at metric
creation time. Existing adopters are not affected, unless you opt in,
you continue to use the global factory.1 parent 27ecca7 commit 98d3617
File tree
2 files changed
+329
-39
lines changed- Sources/CoreMetrics
- Tests/MetricsTests
2 files changed
+329
-39
lines changed
0 commit comments