Documentation ¶
Index ¶
- func CurrentIdx() (out float64)
- func Deinit()
- func DeinitEpochMetrics()
- func Init(namespace string) (http.Handler, error)
- func InitEpochMetrics()
- func ObserveSoloValidator(node common.Address, pubkey rptypes.ValidatorPubkey)
- func ObserveValidator(node common.Address, pubkey rptypes.ValidatorPubkey)
- func OnHead(epoch uint64)
- func PreviousEpochNodes() (out float64)
- func PreviousEpochSoloNodes() (out float64)
- func PreviousEpochSoloValidators() (out float64)
- func PreviousEpochValidators() (out float64)
- func PreviousIdx() (out float64)
- type Metrics
- type MetricsMap
- type MetricsRegistry
- func (m *MetricsRegistry) Counter(name string) prometheus.Counter
- func (m *MetricsRegistry) Gauge(name string) prometheus.Gauge
- func (m *MetricsRegistry) GaugeFunc(name string, handler func() float64)
- func (m *MetricsRegistry) Histogram(name string) prometheus.Histogram
- func (r *MetricsRegistry) UnregisterAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentIdx ¶
func CurrentIdx() (out float64)
func DeinitEpochMetrics ¶
func DeinitEpochMetrics()
func Init ¶
Init intializes the metrics package with the given namespace string. This should only be called once per process.
func InitEpochMetrics ¶
func InitEpochMetrics()
func ObserveSoloValidator ¶
func ObserveSoloValidator(node common.Address, pubkey rptypes.ValidatorPubkey)
func ObserveValidator ¶
func ObserveValidator(node common.Address, pubkey rptypes.ValidatorPubkey)
func PreviousEpochNodes ¶
func PreviousEpochNodes() (out float64)
func PreviousEpochSoloNodes ¶
func PreviousEpochSoloNodes() (out float64)
func PreviousEpochSoloValidators ¶
func PreviousEpochSoloValidators() (out float64)
func PreviousEpochValidators ¶
func PreviousEpochValidators() (out float64)
func PreviousIdx ¶
func PreviousIdx() (out float64)
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics is a package-level singleton to track the state of all metrics generated by the process
type MetricsMap ¶
type MetricsRegistry ¶
type MetricsRegistry struct {
// contains filtered or unexported fields
}
MetricsRegistry proves a per-module api for creating and updating metrics
func NewMetricsRegistry ¶
func NewMetricsRegistry(subsystem string) *MetricsRegistry
NewMetricsRegistry creates a new MetricsRegistry for a given module to use.
func (*MetricsRegistry) Counter ¶
func (m *MetricsRegistry) Counter(name string) prometheus.Counter
Counter creates or fetches a prometheus Counter from the metrics registry and returns it.
func (*MetricsRegistry) Gauge ¶
func (m *MetricsRegistry) Gauge(name string) prometheus.Gauge
Gauge creates or fetches a prometheus Gauge from the metrics registry and returns it.
func (*MetricsRegistry) GaugeFunc ¶
func (m *MetricsRegistry) GaugeFunc(name string, handler func() float64)
func (*MetricsRegistry) Histogram ¶
func (m *MetricsRegistry) Histogram(name string) prometheus.Histogram
Histogram creates or fetches a prometheus Histogram from the metrics registry and returns it.
func (*MetricsRegistry) UnregisterAll ¶
func (r *MetricsRegistry) UnregisterAll()
Click to show internal directories.
Click to hide internal directories.