Dependency Injection extensions for Prometheus.Client
dotnet add package Prometheus.Client.DependencyInjectionpublic IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMetricFactory();
}or compatible with old static code:
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMetricFactory(Metrics.DefaultCollectorRegistry);
}Contributions to the package are always welcome!
All contents of this package are licensed under the MIT license.