metrics

package
v2.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplicationsMetrics

type ReplicationsMetrics struct {
	TotalPointsQueued       *prometheus.CounterVec
	TotalBytesQueued        *prometheus.CounterVec
	CurrentBytesQueued      *prometheus.GaugeVec
	RemoteWriteErrors       *prometheus.CounterVec
	RemoteWriteBytesSent    *prometheus.CounterVec
	RemoteWriteBytesDropped *prometheus.CounterVec
	PointsFailedToQueue     *prometheus.CounterVec
	BytesFailedToQueue      *prometheus.CounterVec
}

func NewReplicationsMetrics

func NewReplicationsMetrics() *ReplicationsMetrics

func (*ReplicationsMetrics) Dequeue

func (rm *ReplicationsMetrics) Dequeue(replicationID platform.ID, queueSize int64)

Dequeue updates the metrics when data has been removed from the queue.

func (*ReplicationsMetrics) EnqueueData

func (rm *ReplicationsMetrics) EnqueueData(replicationID platform.ID, numBytes, numPoints int, queueSize int64)

EnqueueData updates the metrics when adding new data to a replication queue.

func (*ReplicationsMetrics) EnqueueError

func (rm *ReplicationsMetrics) EnqueueError(replicationID platform.ID, numBytes, numPoints int)

EnqueueError updates the metrics when data fails to be added to the replication queue.

func (*ReplicationsMetrics) PrometheusCollectors

func (rm *ReplicationsMetrics) PrometheusCollectors() []prometheus.Collector

PrometheusCollectors satisfies the prom.PrometheusCollector interface.

func (*ReplicationsMetrics) RemoteWriteDropped

func (rm *ReplicationsMetrics) RemoteWriteDropped(replicationID platform.ID, bytes int)

RemoteWriteDropped increases the total count of bytes dropped when data is dropped

func (*ReplicationsMetrics) RemoteWriteError

func (rm *ReplicationsMetrics) RemoteWriteError(replicationID platform.ID, errorCode int)

RemoteWriteError increments the error code counter for the replication.

func (*ReplicationsMetrics) RemoteWriteSent

func (rm *ReplicationsMetrics) RemoteWriteSent(replicationID platform.ID, bytes int)

RemoteWriteSent increases the total count of bytes sent following a successful remote write

Jump to

Keyboard shortcuts

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