prometheusmetrics

package
v0.9.28 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 17

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 Prometheus metrics engine

func New

func New() (m *Metrics)

New Prometheus Engine metrics constructor

func (*Metrics) Handler

func (m *Metrics) Handler() http.Handler

Handler http Hangler for prometheus

func (*Metrics) Name

func (m *Metrics) Name() string

Name returns unique engine name

func (*Metrics) NewCounterWithTags

func (m *Metrics) NewCounterWithTags(opts metrics.Options) (metrics.TagCounter, error)

NewCounterWithTags creates new prometheus counter, registering it

func (*Metrics) NewGaugeWithTags

func (m *Metrics) NewGaugeWithTags(opts metrics.Options) (metrics.TagGauge, error)

NewGaugeWithTags creates new prometheus gauge, registering it

func (*Metrics) NewHistogramWithTags

func (m *Metrics) NewHistogramWithTags(opts metrics.HistogramOptions) (metrics.TagObserver, error)

NewHistogramWithTags creates new histogram, registering it

type TagCounter

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

TagCounter Prometheus counter wrapper

func (*TagCounter) WithLabels

func (tc *TagCounter) WithLabels(lv ...string) metrics.Counter

WithLabels creates metric with given tag values in defined order

func (*TagCounter) WithTags

func (tc *TagCounter) WithTags(tags map[string]string) (metrics.Counter, error)

WithTags creates metric with given tags

type TagGauge

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

TagGauge Prometheus gauge wrapper

func (*TagGauge) WithLabels

func (tg *TagGauge) WithLabels(lv ...string) metrics.Gauge

WithLabels creates metric with given tag values in defined order

func (*TagGauge) WithTags

func (tg *TagGauge) WithTags(tags map[string]string) (metrics.Gauge, error)

WithTags creates metric with given tags

type TagHistogram

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

TagHistogram Prometheus histogram wrapper

func (*TagHistogram) WithLabels

func (th *TagHistogram) WithLabels(lv ...string) metrics.Observer

WithLabels creates metric with given tag values in defined order

func (*TagHistogram) WithTags

func (th *TagHistogram) WithTags(tags map[string]string) (metrics.Observer, error)

WithTags creates metric with given tags

Jump to

Keyboard shortcuts

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