Skip to content

Commit

Permalink
docs: add 'use' section
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Aug 16, 2023
1 parent a23d885 commit 5c34ccc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ Extension for [Prometheus.Client](https://github.com/prom-client-net/prom-client
dotnet add package Prometheus.Client.MetricPusher.HostedService
```

## Use

[Examples](https://github.com/prom-client-net/prom-examples)

```c#
var metricPusher = new MetricPusher(new MetricPusherOptions
{
Endpoint = "http://localhost:9091",
Job = "pushgateway",
Instance = "instance"
});
```

```c#
services.AddMetricPusherService(metricPusher, TimeSpan.FromSeconds(1));
```

## Contribute

Contributions to the package are always welcome!
Expand Down

0 comments on commit 5c34ccc

Please sign in to comment.