problemmetrics

package
v0.8.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProblemMetricsManager

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

ProblemMetricsManager manages problem-converted metrics. ProblemMetricsManager is thread-safe.

var GlobalProblemMetricsManager *ProblemMetricsManager

GlobalProblemMetricsManager is a singleton of ProblemMetricsManager, which should be used to manage all problem-converted metrics across all problem daemons.

func NewProblemMetricsManagerOrDie

func NewProblemMetricsManagerOrDie() *ProblemMetricsManager

func NewProblemMetricsManagerStub

func NewProblemMetricsManagerStub() (*ProblemMetricsManager, *metrics.FakeInt64Metric, *metrics.FakeInt64Metric)

NewProblemMetricsManagerStub creates a ProblemMetricsManager stubbed by fake metrics. The stubbed ProblemMetricsManager and fake metrics are returned.

func (*ProblemMetricsManager) IncrementProblemCounter

func (pmm *ProblemMetricsManager) IncrementProblemCounter(reason string, count int64) error

IncrementProblemCounter increments the value of a problem counter.

func (*ProblemMetricsManager) SetProblemGauge

func (pmm *ProblemMetricsManager) SetProblemGauge(problemType string, reason string, value bool) error

SetProblemGauge sets the value of a problem gauge.

Jump to

Keyboard shortcuts

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