metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sybils             = stats.Int64("sybils", "Sybil nodes launched by Hydra", stats.UnitDimensionless)
	BootstrappedSybils = stats.Int64("bootstrapped_sybils", "Bootstrapped sybil nodes", stats.UnitDimensionless)
	ConnectedPeers     = stats.Int64("connected_peers", "Peers connected to all sybils", stats.UnitDimensionless)
	UniquePeers        = stats.Int64("unique_peers_total", "Total unique peers seen across all sybils", stats.UnitDimensionless)
	RoutingTableSize   = stats.Int64("routing_table_size", "Number of peers in the routing table", stats.UnitDimensionless)
	ProviderRecords    = stats.Int64("provider_records", "Number of provider records in the datastore shared by all sybils", stats.UnitDimensionless)
)

Measures

View Source
var (
	SybilsView = &view.View{
		Measure:     Sybils,
		TagKeys:     []tag.Key{KeyPeerID},
		Aggregation: view.Sum(),
	}
	BootstrappedSybilsView = &view.View{
		Measure:     BootstrappedSybils,
		TagKeys:     []tag.Key{KeyPeerID},
		Aggregation: view.Sum(),
	}
	ConnectedPeersView = &view.View{
		Measure:     ConnectedPeers,
		TagKeys:     []tag.Key{KeyPeerID},
		Aggregation: view.Sum(),
	}
	UniquePeersView = &view.View{
		Measure:     UniquePeers,
		Aggregation: view.LastValue(),
	}
	RoutingTableSizeView = &view.View{
		Measure:     RoutingTableSize,
		Aggregation: view.LastValue(),
	}
	ProviderRecordsView = &view.View{
		Measure:     ProviderRecords,
		Aggregation: view.LastValue(),
	}
)

Views

DefaultViews with all views in it.

View Source
var (
	KeyPeerID, _ = tag.NewKey("peer_id")
)

Keys

View Source
var PrometheusNamespace = "hydrabooster"

PrometheusNamespace is the unique prefix for metrics exported from the app

Functions

func ListenAndServe

func ListenAndServe(port int) error

ListenAndServe sets up an endpoint to collect process metrics (e.g. pprof).

Types

This section is empty.

Jump to

Keyboard shortcuts

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