metrics

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BlockProposed = "proposed"
)
View Source
const Namespace = "op_proposer"

Variables

This section is empty.

Functions

This section is empty.

Types

type Metricer

type Metricer interface {
	RecordInfo(version string)
	RecordUp()

	// Records all L1 and L2 block events
	opmetrics.RefMetricer

	// Record Tx metrics
	txmetrics.TxMetricer

	opmetrics.RPCMetricer

	StartBalanceMetrics(l log.Logger, client *ethclient.Client, account common.Address) io.Closer

	RecordL2BlocksProposed(l2ref eth.L2BlockRef)
}
var NoopMetrics Metricer = new(noopMetrics)

type Metrics

type Metrics struct {
	opmetrics.RefMetrics
	txmetrics.TxMetrics
	opmetrics.RPCMetrics
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(procName string) *Metrics

func (*Metrics) Document added in v1.0.4

func (m *Metrics) Document() []opmetrics.DocumentedMetric

func (*Metrics) RecordInfo

func (m *Metrics) RecordInfo(version string)

RecordInfo sets a pseudo-metric that contains versioning and config info for the op-proposer.

func (*Metrics) RecordL2BlocksProposed

func (m *Metrics) RecordL2BlocksProposed(l2ref eth.L2BlockRef)

RecordL2BlocksProposed should be called when new L2 block is proposed

func (*Metrics) RecordUp

func (m *Metrics) RecordUp()

RecordUp sets the up metric to 1.

func (*Metrics) Registry added in v1.4.2

func (m *Metrics) Registry() *prometheus.Registry

func (*Metrics) StartBalanceMetrics

func (m *Metrics) StartBalanceMetrics(l log.Logger, client *ethclient.Client, account common.Address) io.Closer

Jump to

Keyboard shortcuts

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