prometheus

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Singleton so that it's easier to use in other packages

Index

Constants

View Source
const (
	PlumberRelayRate        = "plumber_relay_rate"
	PlumberRelayErrors      = "plumber_relay_errors"
	PlumberRelayTotalEvents = "plumber_relay_total_events"
	PlumberReadErrors       = "plumber_read_errors"
	PlumberGRPCErrors       = "plumber_grpc_errors"
	PlumberRelayWorkers     = "plumber_relay_workers"
	PlumberTunnels          = "plumber_tunnels"
)

Variables

View Source
var (
	ReportInterval = 10 * time.Second
)

Functions

func Decr added in v1.2.1

func Decr(name string, value int)

Decr decrements a counter by the given amount

func DecrPromGauge added in v1.2.1

func DecrPromGauge(key string)

DecrPromGauge decrements a prometheus gauge by 1

func Incr

func Incr(name string, value int)

Incr increments a counter by the given amount

func IncrPromCounter

func IncrPromCounter(key string, amount int)

IncrPromCounter increments a prometheus counter by the given amount

func IncrPromGauge added in v1.2.1

func IncrPromGauge(key string)

IncrPromGauge decrements a prometheus gauge by 1

func InitPrometheusMetrics

func InitPrometheusMetrics()

InitPrometheusMetrics sets up prometheus counters/gauges

func Mute

func Mute(name string)

Mute stops reporting given stats

func SetPromGauge

func SetPromGauge(key string, amount int)

SetPromGauge sets a prometheus gauge value

func Start

func Start(reportIntervalSeconds int32)

Start initiates CLI stats reporting

Types

This section is empty.

Jump to

Keyboard shortcuts

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