metrics

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package metrics facilitates writing unit tests by allowing the test to read back the value set in a Prometheus metrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadValue

func LoadValue(metricName string, labels ...string) (float64, error)

LoadValue gets the last value reported so unit tests can verify the correct value was reported

func NewCounter added in v0.2.0

func NewCounter(opts prometheus.CounterOpts) prometheus.Counter

NewCounter returns a new Prometheus Counter, created through promauto

func NewCounterVec added in v0.2.0

func NewCounterVec(opts prometheus.CounterOpts, labels []string) *prometheus.CounterVec

NewCounterVec returns a new Prometheus CounterVec, created through promauto

func NewGauge

func NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge

NewGauge returns a new Prometheus Gauge, created through promauto

func NewGaugeVec

func NewGaugeVec(opts prometheus.GaugeOpts, labels []string) *prometheus.GaugeVec

NewGaugeVec returns a new Prometheus GaugeVec, created through promauto

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL