metrics

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 6 Imported by: 0

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