samstarling / finagle-prometheus

Provides a bridge between Finagle and Prometheus metrics
https://samstarling.co.uk/projects/finagle-prometheus/
MIT License
30 stars 18 forks source link

Support per-host configuration #10

Closed samstarling closed 6 years ago

samstarling commented 6 years ago

Hey @spockz: I couldn't figure out a nice way of adding a single commit to your pull request – do you know if that's possible? Instead, I added a commit which resolves the merge conflicts. Let me know what you think.

samstarling commented 6 years ago

Also, do you know if adding parameters to the PrometheusStatsReceiver means that we can't use the META-INF file to make that the default StatsReceiver? This is done in the examples project.

spockz commented 6 years ago

Hey @spockz: I couldn't figure out a nice way of adding a single commit to your pull request – do you know if that's possible? Instead, I added a commit which resolves the merge conflicts. Let me know what you think.

I don’t think that would be possible without having write access to my repository. What you did now is good I suppose.

Regarding the defaults. If you create a default constructor, like def this() = this(defaultRegistry, defaultPatterns), you can keep the StatsReceiver usable through service loading/META-INF. Please keep the constructor arguments as I will be using them, instead of the service loading mechanism.