ops

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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

func Register(mux *http.ServeMux, a *app.App, m *Metrics)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL