File: README.md

package info (click to toggle)
golang-github-nbrownus-go-metrics-prometheus 0.0~git20210712.974a626-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 148 kB
  • sloc: sh: 11; makefile: 9
file content (18 lines) | stat: -rw-r--r-- 591 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## go-metrics-prometheus

This is a reporter for the go-metrics library which will post the metrics to the prometheus client registry . It just updates the registry, taking care of exporting the metrics is still your responsibility.

Usage:

```go
import(
    "github.com/deathowl/go-metrics-prometheus"
    "github.com/prometheus/client_golang/prometheus"
)

prometheusRegistry := prometheus.NewRegistry()
metricsRegistry := metrics.NewRegistry()
pClient := NewPrometheusProvider(metricsRegistry, "test", "subsys", prometheusRegistry, time.Second)
go pClient.UpdatePrometheusMetrics()
```