metrics

package
v1.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultNetworkMetricsTick is the default duration of the
	// observation tick for network metrics.
	DefaultNetworkMetricsTick = 1 * time.Minute
	// DefaultEthereumMetricsTick is the default duration of the
	// observation tick for Ethereum metrics.
	DefaultEthereumMetricsTick = 10 * time.Minute
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(
	port int,
) (*metrics.Registry, bool)

Initialize set up the metrics registry and enables metrics server.

func ObserveConnectedBootstrapCount

func ObserveConnectedBootstrapCount(
	ctx context.Context,
	registry *metrics.Registry,
	netProvider net.Provider,
	bootstraps []string,
	tick time.Duration,
)

ObserveConnectedBootstrapCount triggers an observation process of the connected_bootstrap_count metric.

func ObserveConnectedPeersCount

func ObserveConnectedPeersCount(
	ctx context.Context,
	registry *metrics.Registry,
	netProvider net.Provider,
	tick time.Duration,
)

ObserveConnectedPeersCount triggers an observation process of the connected_peers_count metric.

func ObserveEthConnectivity

func ObserveEthConnectivity(
	ctx context.Context,
	registry *metrics.Registry,
	stakeMonitor chain.StakeMonitor,
	address string,
	tick time.Duration,
)

ObserveEthConnectivity triggers an observation process of the eth_connectivity metric.

Types

This section is empty.

Jump to

Keyboard shortcuts

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