Versions in this module Expand all Collapse all v0 v0.0.1 Aug 28, 2019 Changes in this version + const InstrumentHandlerCounter + const InstrumentHandlerDuration + const InstrumentHandlerInFlight + const InstrumentHandlerRequestSize + const InstrumentHandlerResponseSize + func Deregister(n *Namespace) + func Handler() http.Handler + func InstrumentHandler(metrics []*HTTPMetric, handler http.Handler) http.HandlerFunc + func InstrumentHandlerFunc(metrics []*HTTPMetric, handlerFunc http.HandlerFunc) http.HandlerFunc + func Register(n *Namespace) + func StartTimer(timer Timer) (done func()) + type Counter interface + Inc func(vs ...float64) + type Gauge interface + Add func(float64) + Dec func(...float64) + Inc func(...float64) + Set func(float64) + type HTTPHandlerOpts struct + DurationBuckets []float64 + RequestSizeBuckets []float64 + ResponseSizeBuckets []float64 + type HTTPMetric struct + type LabeledCounter interface + WithValues func(vs ...string) Counter + type LabeledGauge interface + WithValues func(labels ...string) Gauge + type LabeledTimer interface + WithValues func(labels ...string) *labeledTimerObserver + type Labels map[string]string + type Namespace struct + func NewNamespace(name, subsystem string, labels Labels) *Namespace + func (n *Namespace) Add(collector prometheus.Collector) + func (n *Namespace) Collect(ch chan<- prometheus.Metric) + func (n *Namespace) Describe(ch chan<- *prometheus.Desc) + func (n *Namespace) NewCounter(name, help string) Counter + func (n *Namespace) NewDefaultHttpMetrics(handlerName string) []*HTTPMetric + func (n *Namespace) NewDesc(name, help string, unit Unit, labels ...string) *prometheus.Desc + func (n *Namespace) NewGauge(name, help string, unit Unit) Gauge + func (n *Namespace) NewHttpMetrics(handlerName string, ...) []*HTTPMetric + func (n *Namespace) NewHttpMetricsWithOpts(handlerName string, opts HTTPHandlerOpts) []*HTTPMetric + func (n *Namespace) NewInFlightGaugeMetric(handlerName string) *HTTPMetric + func (n *Namespace) NewLabeledCounter(name, help string, labels ...string) LabeledCounter + func (n *Namespace) NewLabeledGauge(name, help string, unit Unit, labels ...string) LabeledGauge + func (n *Namespace) NewLabeledTimer(name, help string, labels ...string) LabeledTimer + func (n *Namespace) NewRequestDurationMetric(handlerName string, buckets []float64) *HTTPMetric + func (n *Namespace) NewRequestSizeMetric(handlerName string, buckets []float64) *HTTPMetric + func (n *Namespace) NewRequestTotalMetric(handlerName string) *HTTPMetric + func (n *Namespace) NewResponseSizeMetric(handlerName string, buckets []float64) *HTTPMetric + func (n *Namespace) NewTimer(name, help string) Timer + func (n *Namespace) WithConstLabels(labels Labels) *Namespace + type Timer interface + Update func(duration time.Duration) + UpdateSince func(time.Time) + type Unit string + const Bytes + const Nanoseconds + const Seconds + const Total