Documentation
¶
Overview ¶
Package obs is subflux's /metrics registry: the platform series and the door every other owner's series registers through. It wraps github.com/cplieger/metrics under another name so the two never collide at an import.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶
Metric is the metrics library's collector, so a series another package declares with that library registers here.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics is the process's one registry; New builds it.
func New ¶
func New() *Metrics
New builds the registry, prefix subflux, with the platform series registered and build_info set. The library already exports process_start_time_seconds beside its other process series.
func (*Metrics) Handler ¶
func (m *Metrics) Handler() http.HandlerFunc
Handler serves the exposition.
func (*Metrics) RecordHTTP ¶
func (m *Metrics) RecordHTTP(r webhttp.RequestMetric)
RecordHTTP is webhttp.WithRecordRouteMetric's hook: the library bounds the method and route labels.
func (*Metrics) RecordPanic ¶
func (m *Metrics) RecordPanic()
RecordPanic counts one recovered handler panic.
func (*Metrics) Register ¶
Register adds other owners' collectors in turn, stopping at the first error: a duplicate family, or one a collector captured at construction.
func (*Metrics) SetConfigMode ¶
SetConfigMode sets mode's config_mode series to 1 and the others to 0. A mode outside settings' three is a programming fault: logged at ERROR, and nothing changes.