trtl

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PmNamespace = "trtl"
)

Variables

View Source
var (
	// Basic RPC Metrics
	PmPuts       *prometheus.CounterVec   // count of trtl Puts per namespace
	PmGets       *prometheus.CounterVec   // count of trtl Gets per namespace
	PmDels       *prometheus.CounterVec   // count of trtl Deletes per namespace
	PmIters      *prometheus.CounterVec   // count of trtl Iters per namespace
	PmRPCLatency *prometheus.HistogramVec // the time it is taking for successful RPC calls to complete, labeled by RPC type, success, and failure

	// Anti-Entropy Metrics
	PmAESyncs         *prometheus.CounterVec   // count of anti entropy sessions per peer, per region, and by perspective (initiator/remote)
	PmAESyncLatency   *prometheus.HistogramVec // duration of anti entropy sessions (initiator perspective), by peer and region
	PmAEPhase1Latency *prometheus.HistogramVec // time phase 1 of anti-entropy is taking from the perspective of the initiator, by peer
	PmAEPhase2Latency *prometheus.HistogramVec // time phase 2 of anti-entropy is taking from the perspective of the remote, by peer
	PmAEVersions      *prometheus.HistogramVec // count of all observed versions, per peer and region
	PmAEUpdates       *prometheus.HistogramVec // pushed objects during anti entropy, by peer and region
	PmAERepairs       *prometheus.HistogramVec // pulled objects during anti entropy, by peer and region
	PmAEStomps        *prometheus.CounterVec   // count of stomped versions, per peer and region
	PmAESkips         *prometheus.CounterVec   // count of skipped versions, per peer and region

)

Functions

This section is empty.

Types

type MetricsService

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

A MetricsService manages Prometheus metrics

func New

func New() (*MetricsService, error)

New creates a metrics service and also initializes all of the prometheus metrics. The trtl server *must* create the metrics service by calling New before any metrics are logged to Prometheus. Even in the case of tests, the metrics service must be created before the tests can be run.

func (*MetricsService) Serve

func (m *MetricsService) Serve(addr string) error

Serve serves the Prometheus metrics

func (*MetricsService) Shutdown

func (m *MetricsService) Shutdown() error

Gracefully shutdown the Prometheus metrics service

Jump to

Keyboard shortcuts

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