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 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
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, 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` ThorchainBlockScannerError MetricName = `thorchain_block_scan_error` BlockDiscoveryDuration MetricName = `block_discovery_duration` ThorchainClientError MetricName = `thorchain_client_error` TxToThorchain MetricName = `tx_to_thorchain` TxToThorchainSigned MetricName = `tx_to_thorchain_signed` SignToThorchainDuration MetricName = `sign_to_thorchain_duration` SendToThorchainDuration MetricName = `send_to_thorchain_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 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.MetricsConfiguration) (*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) GetHistograms ¶
func (m *Metrics) GetHistograms(name MetricName) prometheus.Histogram
GetHistograms return a histogram by name
Click to show internal directories.
Click to hide internal directories.