Skip to content

jiacai2050/prometrics

Repository files navigation

prometrics

https://github.com/jiacai2050/prometrics/workflows/test/badge.svg

Prometheus metrics collector for circuit.

Example

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

License

Apache License 2.0