Documentation
¶
Overview ¶
Package metrics defines the Prometheus series the controller and the agent export. Each owns a private registry rather than the global default, so tests and multiple servers in one process never collide on registration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
Registry *prometheus.Registry
SlotsBusy prometheus.Gauge
SlotsTotal prometheus.Gauge
ProvisionSeconds prometheus.Observer
ProvisionFailures prometheus.Counter
DiskBlocked prometheus.Gauge
GitHubAPIErrors *prometheus.CounterVec
BreakerOpen *prometheus.GaugeVec
PollErrors prometheus.Counter
}
Agent holds the runner host's series. The driver label is fixed per process, so the per-driver series are curried at construction.
type Controller ¶
type Controller struct {
Registry *prometheus.Registry
Offers prometheus.Counter
Claims prometheus.Counter
DispatchLatency prometheus.Histogram
AgentsLost prometheus.Counter
}
Controller holds the control plane's scheduling series.
func NewController ¶
func NewController(activeAgents, queuedJobs func() float64) *Controller
NewController registers the controller series. activeAgents and queuedJobs are read at scrape time from the server's own liveness state.
func (*Controller) Handler ¶
func (m *Controller) Handler() http.Handler
Handler serves the registry in the Prometheus exposition format.
Click to show internal directories.
Click to hide internal directories.