Skip to content

Import path: gitlab.soludian.com/soludian/fountain/libs/metrics/multi

multi

go
import "gitlab.soludian.com/soludian/fountain/libs/metrics/multi"

Package multi provides adapters that send observations to multiple metrics simultaneously. This is useful if your service needs to emit to multiple instrumentation systems at the same time, for example if your organization is transitioning from one system to another.

Index

Variables

go
var KPackageName = "multi"

type Counter

Counter collects multiple individual counters and treats them as a unit.

go
type Counter []metrics.Counter

func NewCounter

go
func NewCounter(c ...metrics.Counter) Counter

NewCounter returns a multi-counter, wrapping the passed counters.

func (Counter) Add

go
func (c Counter) Add(delta float64)

Add implements counter.

func (Counter) With

go
func (c Counter) With(labelValues ...string) metrics.Counter

With implements counter.

type Gauge

Gauge collects multiple individual gauges and treats them as a unit.

go
type Gauge []metrics.Gauge

func NewGauge

go
func NewGauge(g ...metrics.Gauge) Gauge

NewGauge returns a multi-gauge, wrapping the passed gauges.

func (Gauge) Add

go
func (g Gauge) Add(delta float64)

Add implements metrics.Gauge.

func (Gauge) Set

go
func (g Gauge) Set(value float64)

Set implements Gauge.

func (Gauge) With

go
func (g Gauge) With(labelValues ...string) metrics.Gauge

With implements gauge.

type Histogram

Histogram collects multiple individual histograms and treats them as a unit.

go
type Histogram []metrics.Histogram

func NewHistogram

go
func NewHistogram(h ...metrics.Histogram) Histogram

NewHistogram returns a multi-histogram, wrapping the passed histograms.

func (Histogram) Observe

go
func (h Histogram) Observe(value float64)

Observe implements Histogram.

func (Histogram) With

go
func (h Histogram) With(labelValues ...string) metrics.Histogram

With implements histogram.

Generated by gomarkdoc