metrics

package
v0.1.4-RC2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prefix for the metrics of the sequencer package.
	Prefix = "sequencer_"
	// SequencesSentToL1CountName is the name of the metric that counts the sequences sent to L1.
	SequencesSentToL1CountName = Prefix + "sequences_sent_to_L1_count"
	// GasPriceEstimatedAverageName is the name of the metric that shows the average estimated gas price.
	GasPriceEstimatedAverageName = Prefix + "gas_price_estimated_average"
	// TxProcessedName is the name of the metric that counts the processed transactions.
	TxProcessedName = Prefix + "transaction_processed"
	// SequencesOversizedDataErrorName is the name of the metric that counts the sequences with oversized data error.
	SequencesOversizedDataErrorName = Prefix + "sequences_oversized_data_error"
	// EthToMaticPriceName is the name of the metric that shows the Ethereum to Matic price.
	EthToMaticPriceName = Prefix + "eth_to_matic_price"
	// SequenceRewardInMaticName is the name of the metric that shows the reward in Matic of a sequence.
	SequenceRewardInMaticName = Prefix + "sequence_reward_in_matic"
	// ProcessingTimeName is the name of the metric that shows the processing time.
	ProcessingTimeName = Prefix + "processing_time"
	// WorkerPrefix is the prefix for the metrics of the worker.
	WorkerPrefix = Prefix + "worker_"
	// WorkerProcessingTimeName is the name of the metric that shows the worker processing time.
	WorkerProcessingTimeName = WorkerPrefix + "processing_time"
	// TxProcessedLabelName is the name of the label for the processed transactions.
	TxProcessedLabelName = "status"
)

Variables

This section is empty.

Functions

func AverageGasPrice

func AverageGasPrice(price float64)

AverageGasPrice sets the gauge to the given average gas price.

func EthToMaticPrice

func EthToMaticPrice(price float64)

EthToMaticPrice sets the gauge for the Ethereum to Matic price.

func ProcessingTime

func ProcessingTime(lastProcessTime time.Duration)

ProcessingTime observes the last processing time on the histogram.

func Register

func Register()

Register the metrics for the sequencer package.

func SequenceRewardInMatic

func SequenceRewardInMatic(reward float64)

SequenceRewardInMatic sets the gauge for the reward in Matic of a sequence.

func SequencesOvesizedDataError

func SequencesOvesizedDataError()

SequencesOvesizedDataError increases the counter for sequences that encounter a OversizedData error.

func SequencesSentToL1

func SequencesSentToL1(numSequences float64)

SequencesSentToL1 increases the counter by the provided number of sequences sent to L1.

func TxProcessed

func TxProcessed(status TxProcessedLabel, count float64)

TxProcessed increases the counter vector by the provided transactions count and for the given label.

func WorkerProcessingTime

func WorkerProcessingTime(lastProcessTime time.Duration)

WorkerProcessingTime observes the last processing time on the histogram.

Types

type TxProcessedLabel

type TxProcessedLabel string

TxProcessedLabel represents the possible values for the `sequencer_transaction_processed` metric `type` label.

const (
	// TxProcessedLabelSuccessful represents a successful transaction
	TxProcessedLabelSuccessful TxProcessedLabel = "successful"
	// TxProcessedLabelInvalid represents an invalid transaction
	TxProcessedLabelInvalid TxProcessedLabel = "invalid"
	// TxProcessedLabelFailed represents a failed transaction
	TxProcessedLabelFailed TxProcessedLabel = "failed"
)

Jump to

Keyboard shortcuts

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