Documentation
¶
Overview ¶
Package ops provides health, readiness and Prometheus metrics endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register adds /healthz, /readyz and /metrics to a mux.
/healthz is always open: it is the liveness probe and says nothing about what the server holds. /metrics and the per-KB detail of /readyz name the knowledge bases and count their documents, so both sit behind a key when server.ops_require_auth applies. /readyz still answers the plain ready boolean unauthenticated, which is all a readiness probe needs.
Types ¶
type Metrics ¶
type Metrics struct {
Registry *prometheus.Registry
SearchDuration *prometheus.HistogramVec
IndexOps *prometheus.CounterVec
WatcherEvents *prometheus.CounterVec
}
Metrics is the service's Prometheus instrumentation.
func NewMetrics ¶
func NewMetrics() *Metrics
Click to show internal directories.
Click to hide internal directories.