metrics

package
v0.6.0-RC5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 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"
	// EthToPolPriceName is the name of the metric that shows the Ethereum to Pol price.
	EthToPolPriceName = Prefix + "eth_to_pol_price"
	// SequenceRewardInPolName is the name of the metric that shows the reward in Pol of a sequence.
	SequenceRewardInPolName = Prefix + "sequence_reward_in_pol"
	// 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 EthToPolPrice added in v0.5.0

func EthToPolPrice(price float64)

EthToPolPrice sets the gauge for the Ethereum to Pol 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 SequenceRewardInPol added in v0.5.0

func SequenceRewardInPol(reward float64)

SequenceRewardInPol sets the gauge for the reward in Pol 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 (status).

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