prometheus

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: 2 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 is a prometheus based implementation of the stats collector

func NewCollector

func NewCollector() *Collector

NewCollector returns a Prometheus metrics collector

func (*Collector) RegisterCounter

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

RegisterCounter registers a new counter with Prometheus

func (*Collector) RegisterGauge

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

RegisterGauge registers a new gauge with Prometheus

func (*Collector) RegisterTimer

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

RegisterTimer registers a new timer with Prometheus

func (*Collector) Shutdown

func (c *Collector) Shutdown()

Shutdown unregisters and safely shuts down

type Counter

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

Counter for Prometheus

func (*Counter) Add

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

Add to the counter

func (*Counter) Inc

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

Inc the counter

type Gauge

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

Gauge for Prometheus

func (*Gauge) Add

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

Add to the Gauge

func (*Gauge) Inc

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

Inc the Gauge

func (*Gauge) Set

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

Set the Gauge

func (*Gauge) Sub

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

Sub from the Gauge

type Timer

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

Timer for Prometheus

func (*Timer) Observe

func (c *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