metrics

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RaftState = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "aether_raft_state",
		Help: "Current Raft state (0=Follower, 1=Candidate, 2=Leader)",
	})
	CommitIndex = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "aether_raft_commit_index",
		Help: "The latest committed Raft log index",
	})
	ActiveConnections = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "aether_active_connections",
		Help: "Number of active PostgreSQL client connections",
	})
	SQLQueryCount = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "aether_sql_queries_total",
			Help: "Total number of SQL queries processed",
		},
		[]string{"type"},
	)

	LeaderChanges = promauto.NewCounter(prometheus.CounterOpts{
		Name: "aether_leader_changes_total",
		Help: "Total number of leadership changes detected",
	})
)

Functions

func DecConnection

func DecConnection()

func IncConnection

func IncConnection()

func IncLeaderChange added in v1.0.1

func IncLeaderChange()

func IncSQL

func IncSQL(opType string)

func Init

func Init()

func SetCommitIndex

func SetCommitIndex(idx uint64)

func SetRaftState

func SetRaftState(state int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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