Closed gideonkorir closed 6 years ago
That makes sense, yes.
@ahoka does it make sense to add a method signature like:
AddPrometheus<T>(this IServiceCollection services, T metrics) where T : IMetrics, IExposable
The reason for that is because within the AddPrometheus
method we are registering both IMetrics
and IExposable
and those two interfaces aren't directly related
That's reasonable. Please go ahead and create a pull request.
I'm building a background service that I wanted to collect metrics from the background service & expose them using http endpoint. Unfortunately there is no easy way to share the metrics unless you resolve metrics from the service provider, can we provide a method that has an optional metrics parameter?