Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusServer ¶
PrometheusServer is a prometheus server that serves metrics registered in the DefaultRegisterer. It is a wrapper around the promhttp.Handler() handler. The server will be started in a go-routine, and is gracefully stopped on close.
func NewPrometheusServer ¶
func NewPrometheusServer(prometheusAddress string, logger *zap.Logger) (*PrometheusServer, error)
NewPrometheusServer creates a prometheus server if the metrics are enabled and address is set, and valid. Notice, this method does not start the server.
func (*PrometheusServer) Start ¶
func (ps *PrometheusServer) Start()
Start will spawn a http server that will handle requests to /metrics and serves the metrics registered in the DefaultRegisterer.
Click to show internal directories.
Click to hide internal directories.