metrics

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 7 Imported by: ? 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 (
	// DefaultChainMetricsTick is the default duration of the
	// observation tick for chain-related metrics.
	DefaultChainMetricsTick = 10 * time.Minute
	// DefaultNodeMetricsTick is the default duration of the
	// observation tick for node-related metrics.
	DefaultNodeMetricsTick = 10 * time.Second
)

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 ObserveBtcChainConnectivity

func ObserveBtcChainConnectivity(
	ctx context.Context,
	registry *metrics.Registry,
	btcHandle btc.Handle,
	tick time.Duration,
)

ObserveBtcChainConnectivity triggers an observation process of the btc_chain_connectivity metric.

func ObserveHeadersPulled

func ObserveHeadersPulled(
	ctx context.Context,
	registry *metrics.Registry,
	nodeStats node.Stats,
	tick time.Duration,
)

ObserveHeadersPulled triggers an observation process of the headers_pulled metric.

func ObserveHeadersPushed

func ObserveHeadersPushed(
	ctx context.Context,
	registry *metrics.Registry,
	nodeStats node.Stats,
	tick time.Duration,
)

ObserveHeadersPushed triggers an observation process of the headers_pushed metric.

func ObserveHeadersRelayActive

func ObserveHeadersRelayActive(
	ctx context.Context,
	registry *metrics.Registry,
	nodeStats node.Stats,
	tick time.Duration,
)

ObserveHeadersRelayActive triggers an observation process of the headers_relay_active metric.

func ObserveHeadersRelayErrors

func ObserveHeadersRelayErrors(
	ctx context.Context,
	registry *metrics.Registry,
	nodeStats node.Stats,
	tick time.Duration,
)

ObserveHeadersRelayErrors triggers an observation process of the headers_relay_errors metric.

func ObserveHostChainConnectivity

func ObserveHostChainConnectivity(
	ctx context.Context,
	registry *metrics.Registry,
	hostChain chain.Handle,
	tick time.Duration,
)

ObserveHostChainConnectivity triggers an observation process of the host_chain_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