Prometheus metrics collector for circuit.
import (
"github.com/jiacai2050/prometrics"
"github.com/prometheus/client_golang/prometheus"
)
prom := prometrics.GetFactory(prometheus.DefaultRegisterer)
h := circuit.Manager{
DefaultCircuitProperties: []circuit.CommandPropertiesConstructor{
prom.CommandProperties,
// ... other config
}
}
c := h.MustCreateCircuit("hello-world")
Exported metrics can be found in metrics.go. You can also check via
curl 0:8080/metrics | grep circuit