palominolabs/metrics-guice — pull request #4 by robertcboll (2014-04-20 04:12:59+00:00)
Title: Extract listener binding from registry creation in InstrumentationModule

Proposing a change to extract listener binding into BaseInstrumentationModule, allowing users to use this module with an existing metrics registry.

This is great for i.e. Dropwizard integration, where the metrics registry is created by the bootstrap phase and is otherwise integrated with the framework. For example:

.addModule(new BaseInstrumentationModule() {
protected void configure() {
bindMetricsListeners(bootstrap.getMetricRegistry());
}
})