metrics

package
v0.0.0-...-adbc7b5 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: MPL-2.0 Imports: 1 Imported by: 0

README

metrics

Currently, we aim to provide three options to two ways of collecting metrics:

Enable metrics

Metrics can be enabled with -stats flag when running it from command line. -stats.addr can be used to change metrics server address and port.

TBD: how to enable them when running status-go as a library?

Build tags

To select how metrics are collected, status-go must be compiled with proper build tags.

To enable expvar metrics, compile it with metrics build tag:

make statusgo BUILD_TAGS='metrics'

To enable Prometheus metrics, compile it with metrics and prometheus tags:

make statusgo BUILD_TAGS='metrics prometheus'

If no metrics tag is provided, metrics won't be collected or will be printed as DEBUG logs depending on implementation.

Current metrics

Currently, we have defined the following metrics.

Whisper
expvar
  • envelope_counter -- number of envelopes,
  • envelope_new_counter -- number of new envelopes (arrived for the first time, not cached before),
  • envelope_topic_counter -- a map with envelopes counted per topic,
  • envelope_peer_counter -- a map with envelopes counted by peer,
  • envelope_volume -- volume of all envelopes (sum of each envelope's size).
Prometheus
  • envelope_counter -- count envelopes with labels: topic, source (values are peer or p2p), is_new, peer,
  • envelope_volume -- incremental sum of envelopes volume with labels: topic, source (values are peer or p2p), is_new, peer.
Node and peers
expvar
  • node_info -- ID of the current node,
  • node_peers -- marshaled list of all peers remote addresses.
Prometheus

Not available.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsServer

func NewMetricsServer(addr string) *http.Server

NewMetricsServer without metrics build flag does not start any metrics server.

Types

This section is empty.

Directories

Path Synopsis
Package whisper collects Whisper envelope metrics.
Package whisper collects Whisper envelope metrics.

Jump to

Keyboard shortcuts

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