monitoring

package
v1.5.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics contains the metrics gathered by the instance and its path

func NewMetrics

func NewMetrics() *Metrics

NewMetrics func

func (*Metrics) GetMetricByName

func (m *Metrics) GetMetricByName(name string) prometheus.Collector

GetMetricByName returns a metric by it's fully qualified name (used for testing purposes)

func (*Metrics) Init

func (m *Metrics) Init(isUnitTest bool)

Init func

func (*Metrics) RecordDMSLastTimestamp

func (m *Metrics) RecordDMSLastTimestamp()

RecordDMSLastTimestamp records the current timestamp when a DMS is received

func (*Metrics) RecordEgressRequestCnt

func (m *Metrics) RecordEgressRequestCnt(target string)

RecordEgressRequestCnt increases the Egress counter for a taget

func (*Metrics) RecordEgressRequestDur

func (m *Metrics) RecordEgressRequestDur(target string, elapsed float64)

RecordEgressRequestDur registers the Egress duration for a taget

type MetricsI

type MetricsI interface {
	RecordEgressRequestCnt(target string)
	RecordEgressRequestDur(target string, elapsed float64)
	RecordDMSLastTimestamp()
	GetMetricByName(name string) prometheus.Collector
}

MetricsI interface

Jump to

Keyboard shortcuts

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