tsmetrics

package
v0.0.0-...-aac4589 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

type Count struct {
	*Metrics
	*tsmetrics.MetricCount
}

Count is an implementation of metrics.Count.

func (Count) Add

func (metric Count) Add(delta uint64) uint64

Add implementations metrics.Count.

func (Count) WithOverriddenTags

func (metric Count) WithOverriddenTags(tags Fields) metrics.Count

WithOverriddenTags implementations metrics.Count.

type Fields

type Fields = fields.Fields

type Gauge

type Gauge struct {
	*Metrics
	*tsmetrics.MetricGaugeFloat64
}

Gauge is an implementation of metrics.Gauge.

func (Gauge) Add

func (metric Gauge) Add(delta float64) float64

Add implementations metrics.Count.

func (Gauge) WithOverriddenTags

func (metric Gauge) WithOverriddenTags(tags Fields) metrics.Gauge

WithOverriddenTags implementations metrics.Count.

type IntGauge

type IntGauge struct {
	*Metrics
	*tsmetrics.MetricGaugeInt64
}

IntGauge is an implementation of metrics.IntGauge.

func (IntGauge) Add

func (metric IntGauge) Add(delta int64) int64

Add implementations metrics.Count.

func (IntGauge) WithOverriddenTags

func (metric IntGauge) WithOverriddenTags(tags Fields) metrics.IntGauge

WithOverriddenTags implementations metrics.Count.

type Metrics

type Metrics struct {
	Registry *tsmetrics.Registry
	Tags     *tsmetrics.FastTags
}

Metrics implements a wrapper of github.com/xaionaro-go/metrics to implement metrics.Metrics.

func New

func New() *Metrics

New returns a new instance of Metrics

func (*Metrics) Count

func (m *Metrics) Count(key string) metrics.Count

Count implements context.Metrics (see the description in the interface).

func (*Metrics) Gauge

func (m *Metrics) Gauge(key string) metrics.Gauge

Gauge implements context.Metrics (see the description in the interface).

func (*Metrics) IntGauge

func (m *Metrics) IntGauge(key string) metrics.IntGauge

IntGauge implements context.Metrics (see the description in the interface).

func (*Metrics) WithTag

func (m *Metrics) WithTag(key string, value interface{}) metrics.Metrics

WithTag implements context.Metrics (see the description in the interface).

func (*Metrics) WithTags

func (m *Metrics) WithTags(tags Fields) metrics.Metrics

WithTags implements context.Metrics (see the description in the interface).

Jump to

Keyboard shortcuts

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