prometheus

package
v0.11.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics is a prometheus metrics provider

func New

func New() *Metrics

New returns a new Metrics instance

func (*Metrics) Dec

func (m *Metrics) Dec(name string, labels ...string)

Dec decrements the gauge by 1

func (*Metrics) Inc

func (m *Metrics) Inc(name string, labels ...string)

Inc increments the gauge by 1

func (*Metrics) Observe

func (m *Metrics) Observe(name string, value float64, labels ...string)

Observe adds a new observation to the histogram

func (*Metrics) RegisterGauge

func (m *Metrics) RegisterGauge(name string, labels ...string)

RegisterGauge registers a new gauge with the given name and labels

func (*Metrics) RegisterHistogram

func (m *Metrics) RegisterHistogram(name string, labels ...string)

RegisterHistogram registers a new histogram with the given name and labels

func (*Metrics) Set

func (m *Metrics) Set(name string, value float64, labels ...string)

Set sets the gauge to the given value

Jump to

Keyboard shortcuts

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