Help us shape the future of Go! Take the 2026 Go Developer Survey

metrics

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Metrics names.
	MetricNameBuildInfo                  = "doublezero_funder_build_info"
	MetricNameErrors                     = "doublezero_funder_errors_total"
	MetricNameFunderAccountBalanceSOL    = "doublezero_funder_account_balance_sol"
	MetricNameRecipientAccountBalanceSOL = "doublezero_funder_recipient_account_balance_sol"

	// Labels.
	LabelVersion       = "version"
	LabelCommit        = "commit"
	LabelDate          = "date"
	LabelErrorType     = "error_type"
	LabelFunderAccount = "funder_account"
	LabelRecipientName = "recipient_name"

	// Error types.
	ErrorTypeGetRecipients                           = "get_recipients"
	ErrorTypeGetFunderAccountBalance                 = "get_funder_account_balance"
	ErrorTypeFunderAccountBalanceBelowMinimum        = "funder_account_balance_below_minimum"
	ErrorTypeGetRecipientAccountBalance              = "get_recipient_account_balance"
	ErrorTypeTransferFundsToRecipient                = "transfer_funds_to_recipient"
	ErrorTypeWaitForRecipientAccountBalance          = "wait_for_recipient_account_balance"
	ErrorTypeGetInternetLatencyCollectorBalance      = "get_internet_latency_collector_account_balance"
	ErrorTypeTransferFundsToInternetLatencyCollector = "transfer_funds_to_internet_latency_collector"
	ErrorTypeWaitForInternetLatencyCollectorBalance  = "wait_for_internet_latency_collector_balance"
)

Variables

View Source
var (
	BuildInfo = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: MetricNameBuildInfo,
			Help: "Build information of the funder agent",
		},
		[]string{LabelVersion, LabelCommit, LabelDate},
	)

	Errors = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: MetricNameErrors,
			Help: "Number of errors encountered",
		},
		[]string{LabelErrorType},
	)

	FunderAccountBalanceSOL = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: MetricNameFunderAccountBalanceSOL,
			Help: "The balance of the funder account in SOL",
		},
		[]string{LabelFunderAccount},
	)

	RecipientAccountBalanceSOL = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: MetricNameRecipientAccountBalanceSOL,
			Help: "The balance of the recipient account in SOL",
		},
		[]string{LabelRecipientName},
	)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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