README.org
November 24, 2021 ยท View on GitHub
- prometrics
Prometheus metrics collector for [[https://github.com/cep21/circuit][circuit]].
- Example
#+BEGIN_SRC go
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") #+END_SRC
Exported metrics can be found in [[metrics.go]]. You can also check via
#+BEGIN_SRC bash curl 0:8080/metrics | grep circuit #+END_SRC
- License [[LICENSE.txt][Apache License 2.0]]