example

package
v0.27.2-access-fix-en-... Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

README

Running an example that shows metrics data?

  1. Launch a local metrics server, which exposes the metrics data via the /metrics endpoint.

You can choose one of the following:

  • Collection Node:

    go run module/metrics/example/collection/main.go
    
  • Execution Node:

    go run module/metrics/example/execution/main.go
    
  • Verification Node:

    Note: Running example with -happypath flag examines the metrics collection on a real happy path of verification node.

    go run --tags=relic module/metrics/example/verification/main.go
    
  • Consensus Node:

    go run module/metrics/example/consensus/main.go
    

The above commands each launch a metrics server on localhost with port 9090

  1. Install the prometheus server
brew install prometheus
  1. Launch the prometheus server to scrape the metrics from our local metrics server
prometheus --config.file=module/metrics/example/prometheus.yml
  1. Open the prometheus UI in your browser http://localhost:9090/graph

  2. Go to the "Graph" tab to query and verify the collected metrics data type consensus_cur_view, and press "Enter" to view the metrics data over time

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMetricsServer

func WithMetricsServer(f func(logger zerolog.Logger))

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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