metrics

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountDesc

func CountDesc(metric *prometheus.CounterVec, lvs ...string)

func CountInc

func CountInc(err error, totalMetric *prometheus.CounterVec, errorMetric *prometheus.CounterVec, lvs ...string)

func CountSet

func CountSet(metric *prometheus.GaugeVec, val float64, lvs ...string)

func Duration

func Duration(err error, metric *prometheus.HistogramVec, start time.Time, lvs ...string)

Types

type ConversionMetric

type ConversionMetric struct {
	*OpWrapper
}
var Conversion ConversionMetric

type OpWrapper

type OpWrapper struct {
	OpDuration   *prometheus.HistogramVec
	OpTotal      *prometheus.CounterVec
	OpErrorTotal *prometheus.CounterVec
}

func NewOpWrapper

func NewOpWrapper(scope string, labelNames []string) *OpWrapper

func (*OpWrapper) OpWrap

func (metrics *OpWrapper) OpWrap(op func() error, lvs ...string) error

Jump to

Keyboard shortcuts

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