metrics

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoOp      = "n"  // NoOp operation
	DbOp      = "db" // Database operation
	UpdateOp  = "u"  // Update operation
	DeleteOp  = "d"  // Delete operation
	InsertOp  = "i"  // Insert operation
	CommandOp = "c"  // Command operation
)

Variables

View Source
var (
	// Define a custom registry
	Registry *prometheus.Registry

	SnapshotProgressGauge = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "mongo_repl_full_sync_progress",
		Help: "The progress of the full sync",
	}, []string{"database", "collection"})

	SnapshotReadCounter = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "mongo_repl_full_sync_documents_read_total",
		Help: "The total number of documents fetched during a full sync",
	}, []string{"database", "collection"})

	SnapshotWriteCounter = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "mongo_repl_full_sync_documents_write_total",
		Help: "The total number of documents written during a full sync",
	}, []string{"database", "collection", "operation"})

	SnapshotErrorTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "mongo_repl_full_sync_documents_error_total",
		Help: "The total number of documents written during a full sync",
	}, []string{"database", "collection", "error"})

	IncrSyncOplogReadCounter = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "mongo_repl_incr_sync_oplog_read_total",
		Help: "The total number of documents fetched during an incremental sync",
	}, []string{"database", "collection", "operation"})

	IncrSyncOplogWriteCounter = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "mongo_repl_incr_sync_oplog_write_total",
		Help: "The total number of documents written during an incremental sync",
	}, []string{"database", "collection", "operation"})

	CheckpointGauge = prometheus.NewGauge(prometheus.GaugeOpts{
		Name: "mongo_repl_incr_sync_checkpoint",
		Help: "The checkpoint of the incremental sync",
	})

	MongoReplSourceTotalDocumentCount = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "mongo_repl_total_document_count",
		Help: "The total number of documents in the source database",
	}, []string{"origin", "database", "collection"})
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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