Skip to content

Commit 5c34ccc

Browse files
committed
docs: add 'use' section
1 parent a23d885 commit 5c34ccc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ Extension for [Prometheus.Client](https://github.com/prom-client-net/prom-client
1515
dotnet add package Prometheus.Client.MetricPusher.HostedService
1616
```
1717

18+
## Use
19+
20+
[Examples](https://github.com/prom-client-net/prom-examples)
21+
22+
```c#
23+
var metricPusher = new MetricPusher(new MetricPusherOptions
24+
{
25+
Endpoint = "http://localhost:9091",
26+
Job = "pushgateway",
27+
Instance = "instance"
28+
});
29+
```
30+
31+
```c#
32+
services.AddMetricPusherService(metricPusher, TimeSpan.FromSeconds(1));
33+
```
34+
1835
## Contribute
1936

2037
Contributions to the package are always welcome!

0 commit comments

Comments
 (0)