Skip to content

Commit cb6a4d4

Browse files
committed
feat: add overload with default interval
1 parent 4d34288 commit cb6a4d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ServiceCollectionExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ namespace Prometheus.Client.MetricPusher.HostedService;
66

77
public static class ServiceCollectionExtensions
88
{
9+
public static IServiceCollection AddMetricPusherService(this IServiceCollection services, IMetricPusher pusher)
10+
{
11+
return AddMetricPusherService(services, pusher, Defaults.Interval);
12+
}
13+
914
public static IServiceCollection AddMetricPusherService(this IServiceCollection services, IMetricPusher pusher, TimeSpan interval)
1015
{
1116
if (pusher == null)

0 commit comments

Comments
 (0)