monitor_relayer

package
v0.2.102 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {

	// Run
	UpForSeconds        *prometheus.Desc
	NumWatchdogRestarts *prometheus.Desc

	// Network
	NetworkInfoDownloadErrors *prometheus.Desc

	// BlockDownloader
	BlockDownloadErrors             *prometheus.Desc
	BlockValidationErrors           *prometheus.Desc
	BlockCurrentHeight              *prometheus.Desc
	BlocksBehind                    *prometheus.Desc
	AverageBlocksProcessedPerMinute *prometheus.Desc

	// TransactionDownloader
	TransactionsDownloaded                *prometheus.Desc
	AverageTransactionDownloadedPerMinute *prometheus.Desc
	TxPermanentDownloadErrors             *prometheus.Desc
	TxValidationErrors                    *prometheus.Desc
	TxDownloadErrors                      *prometheus.Desc

	// PeerMonitor
	PeersBlacklisted   *prometheus.Desc
	NumPeers           *prometheus.Desc
	PeerDownloadErrors *prometheus.Desc

	// Relayer
	SequencerPermanentParsingError           *prometheus.Desc
	SequencerBlockDownloadError              *prometheus.Desc
	SequencerPermanentBlockDownloadError     *prometheus.Desc
	PersistentSequencerFailedParsing         *prometheus.Desc
	PersistentArweaveFailedParsing           *prometheus.Desc
	DbError                                  *prometheus.Desc
	SequencerBlocksDownloaded                *prometheus.Desc
	SequencerBlocksStreamed                  *prometheus.Desc
	SequencerBlocksCatchedUp                 *prometheus.Desc
	AverageSequencerBlocksProcessedPerMinute *prometheus.Desc
	SequencerTransactionsParsed              *prometheus.Desc
	ArwaeveFinishedHeight                    *prometheus.Desc
	SequencerFinishedHeight                  *prometheus.Desc
	BundleItemsSaved                         *prometheus.Desc
	AverageInteractionsSavedPerMinute        *prometheus.Desc
	L1InteractionsSaved                      *prometheus.Desc
	L2InteractionsSaved                      *prometheus.Desc
	InteractionsSaved                        *prometheus.Desc
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(config *config.Config) *Collector

func (*Collector) Collect

func (self *Collector) Collect(ch chan<- prometheus.Metric)

Collect implements required collect function for all promehteus collectors

func (*Collector) Describe

func (self *Collector) Describe(ch chan<- *prometheus.Desc)

func (*Collector) WithMonitor

func (self *Collector) WithMonitor(m *Monitor) *Collector

type Monitor

type Monitor struct {
	*task.Task

	Report report.Report

	// Arweave block processing speed
	BlockHeights      *deque.Deque[int64]
	TransactionCounts *deque.Deque[uint64]
	InteractionsSaved *deque.Deque[uint64]

	// Sequencer block processing speed
	SequencerBlockHeights *deque.Deque[uint64]

	// Params
	IsFatalError atomic.Bool
	// contains filtered or unexported fields
}

Stores and computes monitor counters

func NewMonitor

func NewMonitor(config *config.Config) (self *Monitor)

func (*Monitor) Clear

func (self *Monitor) Clear()

func (*Monitor) GetPrometheusCollector

func (self *Monitor) GetPrometheusCollector() (collector prometheus.Collector)

func (*Monitor) GetReport

func (self *Monitor) GetReport() *report.Report

func (*Monitor) IsOK

func (self *Monitor) IsOK() bool

func (*Monitor) OnGetHealth

func (self *Monitor) OnGetHealth(c *gin.Context)

func (*Monitor) OnGetState

func (self *Monitor) OnGetState(c *gin.Context)

func (*Monitor) SetPermanentError

func (self *Monitor) SetPermanentError(err error)

func (*Monitor) WithMaxHistorySize added in v0.2.45

func (self *Monitor) WithMaxHistorySize(maxHistorySize int) *Monitor

Jump to

Keyboard shortcuts

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