Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetrics ¶
NewMetrics creates a new Metrics.
Types ¶
type MetricStruct ¶
type MetricStruct any
type Metrics ¶
type Metrics interface {
// Register registers the provided struct under the provided subsystem name.
// A MetricStruct is a struct containing members of the various prometheus metric types
// including Counter, Gauge, Histogram, and Summary.
// Struct tags:
// "help" - the metric's help string
// "buckets" - a list of bucket values for Histogram metrics
Register(subsys string, ms MetricStruct)
// Handler returns the metrics endpoint handler.
Handler() http.Handler
// InstallRoute installs the metrics endpoint handler in the provided chi router.
InstallRoute(chi.Router)
}
Metrics is the interface to the metrics subsystem.
Click to show internal directories.
Click to hide internal directories.