Documentation ¶
Index ¶
- Constants
- func ClosedReasonToNum(reason error) int
- type Metricer
- type Metrics
- func (m *Metrics) Document() []opmetrics.DocumentedMetric
- func (m *Metrics) PendingDABytes() float64
- func (m *Metrics) RecordBatchTxFailed()
- func (m *Metrics) RecordBatchTxSubmitted()
- func (m *Metrics) RecordBatchTxSuccess()
- func (m *Metrics) RecordBlobUsedBytes(num int)
- func (m *Metrics) RecordChannelClosed(id derive.ChannelID, numPendingBlocks int, numFrames int, inputBytes int, ...)
- func (m *Metrics) RecordChannelFullySubmitted(id derive.ChannelID)
- func (m *Metrics) RecordChannelOpened(id derive.ChannelID, numPendingBlocks int)
- func (m *Metrics) RecordChannelTimedOut(id derive.ChannelID)
- func (m *Metrics) RecordInfo(version string)
- func (m *Metrics) RecordL2BlockInChannel(block *types.Block)
- func (m *Metrics) RecordL2BlockInPendingQueue(block *types.Block)
- func (m *Metrics) RecordL2BlocksAdded(l2ref eth.L2BlockRef, ...)
- func (m *Metrics) RecordL2BlocksLoaded(l2ref eth.L2BlockRef)
- func (m *Metrics) RecordLatestL1Block(l1ref eth.L1BlockRef)
- func (m *Metrics) RecordUp()
- func (m *Metrics) Registry() *prometheus.Registry
- func (m *Metrics) StartBalanceMetrics(l log.Logger, client *ethclient.Client, account common.Address) io.Closer
- type TestMetrics
- func (*TestMetrics) Document() []opmetrics.DocumentedMetric
- func (nm *TestMetrics) PendingDABytes() float64
- func (*TestMetrics) RecordBatchTxFailed()
- func (*TestMetrics) RecordBatchTxSubmitted()
- func (*TestMetrics) RecordBatchTxSuccess()
- func (*TestMetrics) RecordBlobUsedBytes(int)
- func (*TestMetrics) RecordChannelClosed(derive.ChannelID, int, int, int, int, error)
- func (*TestMetrics) RecordChannelFullySubmitted(derive.ChannelID)
- func (*TestMetrics) RecordChannelOpened(derive.ChannelID, int)
- func (*TestMetrics) RecordChannelTimedOut(derive.ChannelID)
- func (*TestMetrics) RecordInfo(version string)
- func (m *TestMetrics) RecordL2BlockInChannel(block *types.Block)
- func (m *TestMetrics) RecordL2BlockInPendingQueue(block *types.Block)
- func (*TestMetrics) RecordL2BlocksAdded(eth.L2BlockRef, int, int, int, int)
- func (*TestMetrics) RecordL2BlocksLoaded(eth.L2BlockRef)
- func (*TestMetrics) RecordLatestL1Block(l1ref eth.L1BlockRef)
- func (*TestMetrics) RecordUp()
- func (*TestMetrics) StartBalanceMetrics(log.Logger, *ethclient.Client, common.Address) io.Closer
- type ThrottlingMetrics
- func (*ThrottlingMetrics) Document() []opmetrics.DocumentedMetric
- func (nm *ThrottlingMetrics) PendingDABytes() float64
- func (*ThrottlingMetrics) RecordBatchTxFailed()
- func (*ThrottlingMetrics) RecordBatchTxSubmitted()
- func (*ThrottlingMetrics) RecordBatchTxSuccess()
- func (*ThrottlingMetrics) RecordBlobUsedBytes(int)
- func (*ThrottlingMetrics) RecordChannelClosed(derive.ChannelID, int, int, int, int, error)
- func (*ThrottlingMetrics) RecordChannelFullySubmitted(derive.ChannelID)
- func (*ThrottlingMetrics) RecordChannelOpened(derive.ChannelID, int)
- func (*ThrottlingMetrics) RecordChannelTimedOut(derive.ChannelID)
- func (*ThrottlingMetrics) RecordInfo(version string)
- func (*ThrottlingMetrics) RecordL2BlockInChannel(*types.Block)
- func (*ThrottlingMetrics) RecordL2BlockInPendingQueue(*types.Block)
- func (*ThrottlingMetrics) RecordL2BlocksAdded(eth.L2BlockRef, int, int, int, int)
- func (*ThrottlingMetrics) RecordL2BlocksLoaded(eth.L2BlockRef)
- func (*ThrottlingMetrics) RecordLatestL1Block(l1ref eth.L1BlockRef)
- func (*ThrottlingMetrics) RecordUp()
- func (*ThrottlingMetrics) StartBalanceMetrics(log.Logger, *ethclient.Client, common.Address) io.Closer
Constants ¶
View Source
const ( StageLoaded = "loaded" StageOpened = "opened" StageAdded = "added" StageClosed = "closed" StageFullySubmitted = "fully_submitted" StageTimedOut = "timed_out" TxStageSubmitted = "submitted" TxStageSuccess = "success" TxStageFailed = "failed" )
View Source
const Namespace = "op_batcher"
Variables ¶
This section is empty.
Functions ¶
func ClosedReasonToNum ¶
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 RecordLatestL1Block(l1ref eth.L1BlockRef) RecordL2BlocksLoaded(l2ref eth.L2BlockRef) RecordChannelOpened(id derive.ChannelID, numPendingBlocks int) RecordL2BlocksAdded(l2ref eth.L2BlockRef, numBlocksAdded, numPendingBlocks, inputBytes, outputComprBytes int) RecordL2BlockInPendingQueue(block *types.Block) RecordL2BlockInChannel(block *types.Block) RecordChannelClosed(id derive.ChannelID, numPendingBlocks int, numFrames int, inputBytes int, outputComprBytes int, reason error) RecordChannelFullySubmitted(id derive.ChannelID) RecordChannelTimedOut(id derive.ChannelID) RecordBatchTxSubmitted() RecordBatchTxSuccess() RecordBatchTxFailed() RecordBlobUsedBytes(num int) Document() []opmetrics.DocumentedMetric PendingDABytes() float64 }
type Metrics ¶
type Metrics struct { opmetrics.RefMetrics txmetrics.TxMetrics opmetrics.RPCMetrics // contains filtered or unexported fields }
func NewMetrics ¶
func (*Metrics) Document ¶
func (m *Metrics) Document() []opmetrics.DocumentedMetric
func (*Metrics) PendingDABytes ¶ added in v1.9.5
PendingDABytes returns the current number of bytes pending to be written to the DA layer (from blocks fetched from L2 but not yet in a channel).
func (*Metrics) RecordBatchTxFailed ¶
func (m *Metrics) RecordBatchTxFailed()
func (*Metrics) RecordBatchTxSubmitted ¶
func (m *Metrics) RecordBatchTxSubmitted()
func (*Metrics) RecordBatchTxSuccess ¶
func (m *Metrics) RecordBatchTxSuccess()
func (*Metrics) RecordBlobUsedBytes ¶ added in v1.5.0
func (*Metrics) RecordChannelClosed ¶
func (*Metrics) RecordChannelFullySubmitted ¶
func (*Metrics) RecordChannelOpened ¶
func (*Metrics) RecordChannelTimedOut ¶
func (*Metrics) RecordInfo ¶
RecordInfo sets a pseudo-metric that contains versioning and config info for the op-batcher.
func (*Metrics) RecordL2BlockInChannel ¶ added in v1.1.2
func (*Metrics) RecordL2BlockInPendingQueue ¶ added in v1.1.2
func (*Metrics) RecordL2BlocksAdded ¶
func (m *Metrics) RecordL2BlocksAdded(l2ref eth.L2BlockRef, numBlocksAdded, numPendingBlocks, inputBytes, outputComprBytes int)
RecordL2BlocksAdded should be called when L2 block were added to the channel builder, with the latest added block.
func (*Metrics) RecordL2BlocksLoaded ¶
func (m *Metrics) RecordL2BlocksLoaded(l2ref eth.L2BlockRef)
RecordL2BlocksLoaded should be called when a new L2 block was loaded into the channel manager (but not processed yet).
func (*Metrics) RecordLatestL1Block ¶
func (m *Metrics) RecordLatestL1Block(l1ref eth.L1BlockRef)
func (*Metrics) Registry ¶ added in v1.4.2
func (m *Metrics) Registry() *prometheus.Registry
type TestMetrics ¶ added in v1.10.0
type TestMetrics struct { PendingBlocksBytesCurrent float64 // contains filtered or unexported fields }
func (*TestMetrics) Document ¶ added in v1.10.0
func (*TestMetrics) Document() []opmetrics.DocumentedMetric
func (*TestMetrics) PendingDABytes ¶ added in v1.10.0
func (nm *TestMetrics) PendingDABytes() float64
func (*TestMetrics) RecordBatchTxFailed ¶ added in v1.10.0
func (*TestMetrics) RecordBatchTxFailed()
func (*TestMetrics) RecordBatchTxSubmitted ¶ added in v1.10.0
func (*TestMetrics) RecordBatchTxSubmitted()
func (*TestMetrics) RecordBatchTxSuccess ¶ added in v1.10.0
func (*TestMetrics) RecordBatchTxSuccess()
func (*TestMetrics) RecordBlobUsedBytes ¶ added in v1.10.0
func (*TestMetrics) RecordBlobUsedBytes(int)
func (*TestMetrics) RecordChannelClosed ¶ added in v1.10.0
func (*TestMetrics) RecordChannelFullySubmitted ¶ added in v1.10.0
func (*TestMetrics) RecordChannelOpened ¶ added in v1.10.0
func (*TestMetrics) RecordChannelTimedOut ¶ added in v1.10.0
func (*TestMetrics) RecordInfo ¶ added in v1.10.0
func (*TestMetrics) RecordInfo(version string)
func (*TestMetrics) RecordL2BlockInChannel ¶ added in v1.10.0
func (m *TestMetrics) RecordL2BlockInChannel(block *types.Block)
func (*TestMetrics) RecordL2BlockInPendingQueue ¶ added in v1.10.0
func (m *TestMetrics) RecordL2BlockInPendingQueue(block *types.Block)
func (*TestMetrics) RecordL2BlocksAdded ¶ added in v1.10.0
func (*TestMetrics) RecordL2BlocksLoaded ¶ added in v1.10.0
func (*TestMetrics) RecordL2BlocksLoaded(eth.L2BlockRef)
func (*TestMetrics) RecordLatestL1Block ¶ added in v1.10.0
func (*TestMetrics) RecordLatestL1Block(l1ref eth.L1BlockRef)
type ThrottlingMetrics ¶ added in v1.9.5
type ThrottlingMetrics struct {
// contains filtered or unexported fields
}
ThrottlingMetrics is a noopMetrics that always returns a max value for PendingDABytes, to use in testing batcher backlog throttling.
func (*ThrottlingMetrics) Document ¶ added in v1.9.5
func (*ThrottlingMetrics) Document() []opmetrics.DocumentedMetric
func (*ThrottlingMetrics) PendingDABytes ¶ added in v1.9.5
func (nm *ThrottlingMetrics) PendingDABytes() float64
func (*ThrottlingMetrics) RecordBatchTxFailed ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordBatchTxFailed()
func (*ThrottlingMetrics) RecordBatchTxSubmitted ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordBatchTxSubmitted()
func (*ThrottlingMetrics) RecordBatchTxSuccess ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordBatchTxSuccess()
func (*ThrottlingMetrics) RecordBlobUsedBytes ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordBlobUsedBytes(int)
func (*ThrottlingMetrics) RecordChannelClosed ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordChannelFullySubmitted ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordChannelOpened ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordChannelTimedOut ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordInfo ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordInfo(version string)
func (*ThrottlingMetrics) RecordL2BlockInChannel ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordL2BlockInPendingQueue ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordL2BlocksAdded ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordL2BlocksLoaded ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordL2BlocksLoaded(eth.L2BlockRef)
func (*ThrottlingMetrics) RecordLatestL1Block ¶ added in v1.9.5
func (*ThrottlingMetrics) RecordLatestL1Block(l1ref eth.L1BlockRef)
Click to show internal directories.
Click to hide internal directories.