Versions in this module Expand all Collapse all v0 v0.1.1 Dec 24, 2023 v0.1.0 Dec 24, 2023 Changes in this version + func ExponentialBounds[N ~float64 | ~int64](base, first, max N) []N + func LinearBounds[N ~int64 | ~float64](size, min, max N) []N + func NewHandler(resource map[string]string, f func(name string) bool) http.Handler + func Read(f func(name string) bool) []md.Metric + func Register(r Reader) + func RegisterObservableGauge[N ~int64 | ~float64](name string, sum SumKind, observe func() N, desc string) + func Reset() + func SetErrorHandler(f func(error)) func(error) + type Counter struct + func NewCounter[N ~int64 | ~float64](name, desc string) *Counter[N] + func (c *Counter[N]) Add(n N) + type Description struct + Cumulative bool + Description string + Name string + Sum SumKind + Unit string + func All() []Description + type Gauge struct + func NewGauge[N ~int64 | ~float64](name string, sum SumKind, desc string) *Gauge[N] + func (g *Gauge[N]) Set(n N) + type Group struct + func NewCounterGroup[N ~int64 | ~float64, A comparable](name, desc string) Group[*Counter[N], A] + func NewGaugeGroup[N ~int64 | ~float64, A comparable](name string, sum SumKind, desc string) Group[*Gauge[N], A] + func NewHistogramGroup[N ~int64 | ~float64, A comparable](name string, bounds []N, desc string) Group[*Histogram[N], A] + func (g Group[I, A]) At(attrs A) I + type Histogram struct + func NewHistogram[N ~int64 | ~float64](name string, bounds []N, desc string) *Histogram[N] + func (h *Histogram[N]) Record(x N) + type ObservableGaugeGroup struct + func NewObservableGaugeGroup[N ~int64 | ~float64, A comparable](name string, sum SumKind, desc string) ObservableGaugeGroup[N, A] + func (g ObservableGaugeGroup[N, A]) Register(attrs A, observe func() N) + type Reader interface + Descriptions func() []Description + Read func(names []string) []md.Metric + type SumKind int + const NonSummable + const Summable