statsd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector for Statsd

func NewCollector

func NewCollector(addr, prefix string, logger *logrus.Logger, flushPeriod time.Duration) *Collector

NewCollector creates a metric collector which sends data to Statsd

func (*Collector) RegisterCounter

func (c *Collector) RegisterCounter(options adapter.CollectorOptions) adapter.Counter

RegisterCounter creates a new counter for Statsd

func (*Collector) RegisterGauge

func (c *Collector) RegisterGauge(options adapter.CollectorOptions) adapter.Gauge

RegisterGauge creates a new gauge for Statsd

func (*Collector) RegisterTimer

func (c *Collector) RegisterTimer(options adapter.CollectorOptions) adapter.Timer

RegisterTimer creates a new timer for Statsd

func (*Collector) Shutdown

func (c *Collector) Shutdown()

Shutdown closes the current Statsd connection

type Counter

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

Counter for noop

func (*Counter) Add

func (s *Counter) Add(n int64, labels adapter.Labels)

Add to the Counter

func (*Counter) Inc

func (s *Counter) Inc(labels adapter.Labels)

Inc the Counter

type Gauge

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

Gauge for Statsd

func (*Gauge) Add

func (s *Gauge) Add(n int64, labels adapter.Labels)

Add to the Gauge

func (*Gauge) Inc

func (s *Gauge) Inc(labels adapter.Labels)

Inc the Gauge

func (*Gauge) Set

func (s *Gauge) Set(n int64, labels adapter.Labels)

Set the Gauge

func (*Gauge) Sub

func (s *Gauge) Sub(n int64, labels adapter.Labels)

Sub from the Gauge

type Timer

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

Timer for Statsd

func (*Timer) Observe

func (s *Timer) Observe(n int64, labels adapter.Labels)

Observe records a new timing

Jump to

Keyboard shortcuts

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