github.com/klaytn/klaytn@v1.12.1/metrics/prometheus/README.md (about)

     1  **go-metrics-prometheus**
     2  [![Build Status](https://api.travis-ci.org/deathowl/go-metrics-prometheus.svg)](https://travis-ci.org/deathowl/go-metrics-prometheus)
     3  
     4  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.
     5  
     6  
     7  Usage:
     8  
     9  ```
    10  
    11  	import "github.com/deathowl/go-metrics-prometheus"
    12  	import "github.com/prometheus/client_golang/prometheus"
    13  
    14      	prometheusRegistry := prometheus.NewRegistry()
    15          metricsRegistry := metrics.NewRegistry()
    16          pClient := NewPrometheusProvider(metricsRegistry, "test", "subsys", prometheusRegistry, 1*time.Second)
    17          go pClient.UpdatePrometheusMetrics()
    18  ```
    19