Version: v0.12.0 Latest Latest

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

Go to latest
Published: Sep 18, 2021 License: MIT Imports: 1 Imported by: 54



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.



This section is empty.


This section is empty.


This section is empty.


type Counter

type Counter []metrics.Counter

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

func NewCounter

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

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

func (Counter) Add

func (c Counter) Add(delta float64)

Add implements counter.

func (Counter) With

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

With implements counter.

type Gauge

type Gauge []metrics.Gauge

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

func NewGauge

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

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

func (Gauge) Add added in v0.4.0

func (g Gauge) Add(delta float64)

Add implements metrics.Gauge.

func (Gauge) Set

func (g Gauge) Set(value float64)

Set implements Gauge.

func (Gauge) With

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

With implements gauge.

type Histogram

type Histogram []metrics.Histogram

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

func NewHistogram

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

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

func (Histogram) Observe

func (h Histogram) Observe(value float64)

Observe implements Histogram.

func (Histogram) With

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

With implements histogram.

Source Files

Jump to

Keyboard shortcuts

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