Documentation ¶
Overview ¶
Package metrics implements an HTTP metrics server along with its life cycle: start, shutdown, and register metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registerer ¶
type Registerer interface {
RegisterMetrics(Registry)
}
type Registry ¶
type Registry interface { Register(prometheus.Collector) error MustRegister(...prometheus.Collector) }
Registry defines the interface of the prometheus metrics registry
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
A metrics server holds the http API and the prometheus registry which provides access to the registered metrics.
func NewServer ¶
Create new metrics server. Do not listen to the given address until the server is started.
func (Server) MustRegister ¶
func (m Server) MustRegister(collectors ...prometheus.Collector)
MustRegister registers multiple prometheus collectors in the prometheus registry used by the metrics server.
func (Server) Register ¶
func (m Server) Register(collector prometheus.Collector) error
Register registers a prometheus collector in the prometheus registry used by the metrics server.
Click to show internal directories.
Click to hide internal directories.