Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in Slasher Metrics #5060

Merged
merged 10 commits into from Mar 10, 2020
Merged

Add in Slasher Metrics #5060

merged 10 commits into from Mar 10, 2020

Conversation

rauljordan
Copy link
Contributor

@rauljordan rauljordan commented Mar 10, 2020

This resolves #5056.


Description

Write a summary of the changes you are making

This PR adds important metrics for us to understand the behavior of our running slasher in production.

In slasher

  • Num atts received from the beacon node
  • Cache evictions
  • Lowest and highest observed epochs by slasher
  • Latest min/max span distances observed
  • Num double proposals and double votes detected
  • Num surrounding and surrounded votes detected

In the beacon node

  • Total slashings received, total slashing successfully inserted in pool
  • False positives for slashings received (validator already slashed, exited, etc.)

@CLAassistant
Copy link

CLAassistant commented Mar 10, 2020

CLA assistant check
All committers have signed the CLA.

surroundedVotesDetected = promauto.NewCounter(prometheus.CounterOpts{
Name: "surrounded_votes_detected",
Help: "The # of surrounded slashable events detected",
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a "rejected by beacon node pool" metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add in the beacon node side

@rauljordan rauljordan added the Ready For Review A pull request ready for code review label Mar 10, 2020
Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
"github.com/prometheus/client_golang/prometheus/promauto"
)

var (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we follow prometheus's metric and label naming conventions? (ie. end with _total for most of these)

https://prometheus.io/docs/practices/naming/

@prylabs-bulldozer prylabs-bulldozer bot merged commit 8d3fc1a into master Mar 10, 2020
@delete-merged-branch delete-merged-branch bot deleted the slasher-metrics branch March 10, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slasher Prom Metrics
4 participants