metrics

package
v0.0.0-...-4f0ab6e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// 各个分片级别的metrics
	ShardHeight         *prometheus.GaugeVec
	StorageShardHeight  *prometheus.GaugeVec
	PendingTxNum        *prometheus.GaugeVec
	ShardPresence       *prometheus.GaugeVec
	ShardEnableMinerNum *prometheus.GaugeVec
	BroadcastedMsgCnt   *prometheus.CounterVec
	ConfirmedTxCnt      *prometheus.CounterVec
	// 全局的metrics 小贴士: prometheus.Gauge是接口类型,如果用指针*prometheus.Gauge的话,无法正常调用方法
	OnlineMiner      prometheus.Gauge
	ConnectedPeerNum prometheus.Gauge
	EnableShardsNum  prometheus.Gauge
}

Metrics used for prometheus

var Metric *Metrics

Metric 是全局监控实例

func ProvideMonitorMetrics

func ProvideMonitorMetrics() *Metrics

ProvideMonitorMetrics returns the global variable Metric.

Jump to

Keyboard shortcuts

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