telemetry

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncrementProcessSignalFailed

func IncrementProcessSignalFailed()

IncrementProcessSignalFailed increments the number of failed processing signal round.

func IncrementProcessSignalSkipped

func IncrementProcessSignalSkipped()

IncrementProcessSignalSkipped increments the number of processing signal round that being skipped.

func IncrementProcessSignalSuccess

func IncrementProcessSignalSuccess()

IncrementProcessSignalSuccess increments the number of successful processing signal round.

func IncrementProcessingSignal

func IncrementProcessingSignal()

IncrementProcessingSignal increments the number of processing signal round.

func IncrementSubmitTxFailed

func IncrementSubmitTxFailed()

IncrementSubmitTxFailed increments the number of failed submitting transaction process.

func IncrementSubmitTxSuccess

func IncrementSubmitTxSuccess()

IncrementSubmitTxSuccess increments the number of success submitting transaction process.

func IncrementSubmittingTx

func IncrementSubmittingTx()

IncrementSubmittingTx increments the number of submitting transaction process.

func IncrementUpdateRegistryFailed

func IncrementUpdateRegistryFailed(hashID string)

IncrementUpdateRegistryFailed increments the number of failed Bothan's registry update request.

func IncrementUpdateRegistrySuccess

func IncrementUpdateRegistrySuccess(hashID string)

IncrementUpdateRegistrySuccess increments the number of successful Bothan's registry update request.

func IncrementUpdatingRegistry

func IncrementUpdatingRegistry(hashID string)

IncrementUpdatingRegistry increments the number of sending a Bothan's registry update request.

func ObserveQuerySignalPricesDuration

func ObserveQuerySignalPricesDuration(duration float64)

ObserveQuerySignalPricesDuration observes the time being consumed for querying signal price from Bothan server.

func ObserveSignalPriceUpdateInterval

func ObserveSignalPriceUpdateInterval(signalPrices []feedstypes.SignalPrice)

ObserveSignalPriceUpdateInterval observes the time interval between the last two updates of the same signal price.

func ObserveSubmitTxDuration

func ObserveSubmitTxDuration(duration float64)

ObserveSubmitTxDuration observes the time being consumed for submitting a transaction to the BandChain.

func ObserveWaitingSenderDuration

func ObserveWaitingSenderDuration(duration float64)

ObserveWaitingSenderDuration observes the time being consumed for waiting available sender.

func SetConversionErrorSignals

func SetConversionErrorSignals(count int)

SetConversionErrorSignals sets the number of signal that failed to convert the result from Bothan server in the round.

func SetFilteredSignalIDs

func SetFilteredSignalIDs(count int)

SetFilteredSignalIDs sets the number of signal that should be submitted to BandChain in the round.

func SetNonPendingSignals

func SetNonPendingSignals(count int)

SetNonPendingSignals sets the number of non-pending signal in the round.

func SetNonUrgentUnavailablePriceSignals

func SetNonUrgentUnavailablePriceSignals(count int)

SetNonUrgentUnavailablePriceSignals sets the number of non-urgent signal in the round.

func SetSignalNotFound

func SetSignalNotFound(count int)

SetSignalNotFound sets the number of signal ID that not being found from the list.

func SetSignalPriceStatuses

func SetSignalPriceStatuses(newSignalPrices []feedstypes.SignalPrice)

SetSignalPriceStatuses sets the current number of signal price status.

func SetValidatorStatus

func SetValidatorStatus(status bool)

SetValidatorStatus sets the validator status.

func StartServer

func StartServer(l *logger.Logger, config context.Config)

StartServer starts a metrics server in a background goroutine, accepting connections on the given listener. Any HTTP logging will be written at info level to the given logger. The server will be forcefully shut down when ctx finishes.

Types

type GroguCollector

type GroguCollector struct {
	Registry               *prometheus.Registry
	SignalPriceStatus      map[string]feedstypes.SignalPriceStatus
	SignalPriceStatusCount map[feedstypes.SignalPriceStatus]int
	SignalPriceLastUpdated map[string]time.Time

	// Updater metrics
	UpdatingRegistryCountVec      *prometheus.CounterVec // a counter for Bothan registry update.
	UpdateRegistryFailedCountVec  *prometheus.CounterVec // a counter for an unsuccessful Bothan registry update.
	UpdateRegistrySuccessCountVec *prometheus.CounterVec // a counter for successful Bothan registry update.

	// Signaler metrics
	ValidatorStatusGauge               prometheus.Gauge    // a gauge for the current validator status.
	ProcessingSignalCount              prometheus.Counter  // a counter for the number of processing signal round.
	ProcessSignalSkippedCount          prometheus.Counter  // a counter for the number of skipped processing signal round.
	ProcessSignalFailedCount           prometheus.Counter  // a counter for the number of failed processing signal round.
	ProcessSignalSuccessCount          prometheus.Counter  // a counter for the number of successful processing signal round.
	QuerySignalPricesDuration          prometheus.Summary  // a summary for the time being consumed for querying signal price from Bothan server.
	NonPendingSignalsGauge             prometheus.Gauge    // a gauge for current signal in the round.
	ConversionErrorSignalsGauge        prometheus.Gauge    // a gauge for the number of signal that failed to convert the result from Bothan server in the round.
	SignalNotFoundGauge                prometheus.Gauge    // a gauge for the number of signal ID that not being found from the list.
	NonUrgentUnavailableSignalIDsGauge prometheus.Gauge    // a gauge for the number of non-urgent signal in the round.
	FilteredSignalingIDsGauge          prometheus.Gauge    // a gauge for the number of signal that should be submitted to BandChain in the round.
	SignalPriceStatusGauge             prometheus.GaugeVec // a gauge for the number of signal per its status (every signals).

	// Submitter metrics
	SubmittingTxCount     prometheus.Counter    // a counter for the number of submitting transaction process.
	SubmitTxFailedCount   prometheus.Counter    // a counter for the number of failed submitting transaction process.
	SubmitTxSuccessCount  prometheus.Counter    // a counter for the number of success submitting transaction process.
	SubmitTxDuration      prometheus.Summary    // a summary for the time being consumed for submitting a transaction to the BandChain.
	WaitingSenderDuration prometheus.Summary    // a summary for the time being consumed for waiting available sender.
	UpdatedSignalInterval prometheus.SummaryVec // a summary for the time interval between the last two updates of the same signal price.
}

Metrics is the metrics struct.

func NewGroguCollector

func NewGroguCollector(labels prometheus.Labels) *GroguCollector

NewGroguCollector creates a new grogu collector instance.

func (GroguCollector) Collect

func (c GroguCollector) Collect(ch chan<- prometheus.Metric)

Collect sends the metric values for each metric related to the grogu collector to the provided channel.

func (GroguCollector) Describe

func (c GroguCollector) Describe(ch chan<- *prometheus.Desc)

Describe sends the descriptors of each metric to the provided channel.

Jump to

Keyboard shortcuts

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