Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NumMaliciousProps = metrics.NewCounter( "malicious_proposals", subsystem, "number of malicious proposals", []string{}, ).WithLabelValues()
Functions ¶
func MetricNameCalculatedWeight ¶ added in v1.5.0
func MetricNameCalculatedWeight() string
Types ¶
type BeaconMetricsCollector ¶
type BeaconMetricsCollector struct {
// contains filtered or unexported fields
}
BeaconMetricsCollector is a prometheus Collector for beacon metrics.
func NewBeaconMetricsCollector ¶
func NewBeaconMetricsCollector(cb GatherCB, logger log.Logger) *BeaconMetricsCollector
NewBeaconMetricsCollector creates a prometheus Collector for beacons.
func (*BeaconMetricsCollector) Collect ¶
func (bmc *BeaconMetricsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Collector.
func (*BeaconMetricsCollector) Describe ¶
func (bmc *BeaconMetricsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Collector.
func (*BeaconMetricsCollector) Start ¶
func (bmc *BeaconMetricsCollector) Start(registry *prometheus.Registry)
Start registers the Collector with specified prometheus registry and starts the metrics collection.
func (*BeaconMetricsCollector) Stop ¶
func (bmc *BeaconMetricsCollector) Stop()
Stop unregisters the Collector with specified prometheus registry and stops the metrics collection.
type BeaconStats ¶
BeaconStats hold metadata for each beacon value.
type GatherCB ¶
type GatherCB func() ([]*BeaconStats, *BeaconStats)
GatherCB returns stats for the observed and calculated beacons.
Click to show internal directories.
Click to hide internal directories.