Documentation ¶
Index ¶
- func AddChainMetrics(chain common.Chain, counters map[MetricName]prometheus.Counter, ...)
- type MetricName
- func BlockNoTxIn(chain common.Chain) MetricName
- func BlockNoTxOut(chain common.Chain) MetricName
- func BlockScanError(chain common.Chain) MetricName
- func BlockWithTxIn(chain common.Chain) MetricName
- func BlockWithTxOut(chain common.Chain) MetricName
- func BlockWithoutTx(chain common.Chain) MetricName
- func GasPrice(chain common.Chain) MetricName
- func GasPriceChange(chain common.Chain) MetricName
- func GasPriceSuggested(chain common.Chain) MetricName
- func SearchTxDuration(chain common.Chain) MetricName
- func SignAndBroadcastDuration(chain common.Chain) MetricName
- func TxSigned(chain common.Chain) MetricName
- func TxSignedBroadcast(chain common.Chain) MetricName
- type Metrics
- func (m *Metrics) GetCounter(name MetricName) prometheus.Counter
- func (m *Metrics) GetCounterVec(name MetricName) *prometheus.CounterVec
- func (m *Metrics) GetGauge(name MetricName) prometheus.Gauge
- func (m *Metrics) GetHistograms(name MetricName) prometheus.Histogram
- func (m *Metrics) Start() error
- func (m *Metrics) Stop() error
- type TssKeysignMetricMgr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChainMetrics ¶
func AddChainMetrics(chain common.Chain, counters map[MetricName]prometheus.Counter, counterVecs map[MetricName]*prometheus.CounterVec, gauges map[MetricName]prometheus.Gauge, histograms map[MetricName]prometheus.Histogram)
Types ¶
type MetricName ¶
type MetricName string
MetricName
const ( TotalBlockScanned MetricName = `total_block_scanned` CurrentPosition MetricName = `current_position` TotalRetryBlocks MetricName = `total_retry_blocks` CommonBlockScannerError MetricName = `block_scanner_error` DdchainBlockScannerError MetricName = `ddchain_block_scan_error` BlockDiscoveryDuration MetricName = `block_discovery_duration` DdchainClientError MetricName = `ddchain_client_error` TxToDdchain MetricName = `tx_to_ddchain` TxToDdchainSigned MetricName = `tx_to_ddchain_signed` SignToDdchainDuration MetricName = `sign_to_ddchain_duration` SendToDdchainDuration MetricName = `send_to_ddchain_duration` ObserverError MetricName = `observer_error` SignerError MetricName = `signer_error` PubKeyManagerError MetricName = `pubkey_manager_error` )
func BlockNoTxIn ¶
func BlockNoTxIn(chain common.Chain) MetricName
func BlockNoTxOut ¶
func BlockNoTxOut(chain common.Chain) MetricName
func BlockScanError ¶
func BlockScanError(chain common.Chain) MetricName
func BlockWithTxIn ¶
func BlockWithTxIn(chain common.Chain) MetricName
func BlockWithTxOut ¶
func BlockWithTxOut(chain common.Chain) MetricName
func BlockWithoutTx ¶
func BlockWithoutTx(chain common.Chain) MetricName
func GasPrice ¶
func GasPrice(chain common.Chain) MetricName
func GasPriceChange ¶
func GasPriceChange(chain common.Chain) MetricName
func GasPriceSuggested ¶
func GasPriceSuggested(chain common.Chain) MetricName
func SearchTxDuration ¶
func SearchTxDuration(chain common.Chain) MetricName
func SignAndBroadcastDuration ¶
func SignAndBroadcastDuration(chain common.Chain) MetricName
func TxSigned ¶
func TxSigned(chain common.Chain) MetricName
func TxSignedBroadcast ¶
func TxSignedBroadcast(chain common.Chain) MetricName
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics used to provide promethus metrics
func NewMetrics ¶
func NewMetrics(cfg config.BifrostMetricsConfiguration) (*Metrics, error)
NewMetrics create a new instance of Metrics
func (*Metrics) GetCounter ¶
func (m *Metrics) GetCounter(name MetricName) prometheus.Counter
GetCounter return a counter by name, if it doesn't exist, then it return nil
func (*Metrics) GetCounterVec ¶
func (m *Metrics) GetCounterVec(name MetricName) *prometheus.CounterVec
func (*Metrics) GetGauge ¶
func (m *Metrics) GetGauge(name MetricName) prometheus.Gauge
GetGauges return a gauge by name
func (*Metrics) GetHistograms ¶
func (m *Metrics) GetHistograms(name MetricName) prometheus.Histogram
GetHistograms return a histogram by name
type TssKeysignMetricMgr ¶
type TssKeysignMetricMgr struct {
// contains filtered or unexported fields
}
TssKeysignMetricMgr is a struct to manage tss keysign metric in memory
func NewTssKeysignMetricMgr ¶
func NewTssKeysignMetricMgr() *TssKeysignMetricMgr
NewTssKeysignMetricMgr create a new instance of TssKeysignMetricMgr
func (*TssKeysignMetricMgr) GetTssKeysignMetric ¶
func (m *TssKeysignMetricMgr) GetTssKeysignMetric(hash string) int64
GetTssKeysignMetric get the metric of the given hash , and delete it after
func (*TssKeysignMetricMgr) SetTssKeysignMetric ¶
func (m *TssKeysignMetricMgr) SetTssKeysignMetric(hash string, elapseInMs int64)
SetTssKeysignMetric save the tss keysign time metric against the given hash
Click to show internal directories.
Click to hide internal directories.