Is there any option to sync metrics from hashicorp/raft pkg to prometheus application pkg?

37 Views Asked by At

Is there any easy way to sync metrics, which using globally in lib https://github.com/hashicorp/raft, like here:

metrics.IncrCounter([]string{"raft", "state", "follower"}, 1)

Or there is only way to implement myself metrics like that:

leaderChangesCounter = prometheus.NewCounter(
    prometheus.CounterOpts{
        Name: "raft_leader_changes_total",
        Help: "Total number of Raft leader changes",
    },
)
...
0

There are 0 best solutions below