Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ReceivedLogs = promauto.NewCounter(prometheus.CounterOpts{ Namespace: prometheusNamespace, Name: "received_log_count", Help: "The total number of Raft logs sent for application to the fsm", }) LastFSMSnapshot = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: prometheusNamespace, Name: "last_fsm_snapshot", Help: "The unix time in seconds when the last fsm snapshot was taken", }) PulledTasks = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: prometheusNamespace, Name: "pulled_task_total", Help: "The total number of tasks sent to clients", }, []string{"method", "queue"}) PushedTasks = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: prometheusNamespace, Name: "pushed_task_total", Help: "The total number of tasks pushed from clients to the server", }, []string{"method", "queue"}) RemovedTasks = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: prometheusNamespace, Name: "removed_task_total", Help: "The total number of tasks removed from the queue", }, []string{"method", "queue"}) IsLeader = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: prometheusNamespace, Name: "is_leader", Help: "A boolean value that indicates if a peer is the cluster leader", }) )
View Source
var Logger *zap.Logger
Logger is the global logger.
Clients should use this directly after it has been configured with the InitLogger method.
Functions ¶
func InitLogger ¶
InitLogger initializes Logger.
Enabling debug logging will display logs in a more readable format in addition to displaying debug-level logs and above.
func LogRequestID ¶
LogRequestID returns a zap log field for http request IDs.
func StartPromServer ¶
StartPromServer exposes prometheus metrics on the given port.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.