Add MetricRegistry factory#35
Conversation
Current coverage is
|
This patchset allows to configure a different way on how MetricRegistry objects are created: Up to now these were created within money itself with no exposition to the rest of the system. That makes it impossible to register other Dropwizzard reporters or exporters on it. With this patchset it is now possible to provide a custom MetricRegistry factory and do the required initialization of/with the MetricRegistry object. It is compatible to Java so even Java clients (using the Scala money) can implement and configure a custom factory.
There was a problem hiding this comment.
I am thinking since we defined the Default in reference.conf and ensure the DefaultMetricRegistryFactory is in the classpath by including it in the library we should probably log loudly and move on if there is an error.
There should be no way we hit that Fauilure case unless something is really wrong right?
There was a problem hiding this comment.
Got your point.
Followed the pattern from the overall Money initialization: https://github.com/Comcast/money/pull/19/files#r44557079
There was a problem hiding this comment.
ok, I guess it makes sense to stop and yell loudly
There was a problem hiding this comment.
actually can this lazy val realFactory be at the MetricRegistryFactory level?
That way it gets built once the first time its accessed.
|
👍 |
Add MetricRegistry factory
This patchset allows to configure a different way on how
MetricRegistryobjects are created:Up to now these were created within money itself with no exposition to
the rest of the system. That makes it impossible to register other
Dropwizzard reporters or exporters on it.
With this patchset it is now possible to provide a custom
MetricRegistryfactory and do the required initialization of/with the
MetricRegistryobject.
It is compatible to Java so even Java clients (using the Scala money)
can implement and configure a custom factory.