issue-#151#166
Merged
Merged
Conversation
Collaborator
Author
|
@aqt01 The prioritization you asked for: // GUARD RAILS DOCUMENTATION:
// *************************************************************************************************************
// This section describes 1) hard limits and 2) soft limit alert recommendations for health related metrics
//
// Metric Name | Hard Limit | Soft Limit | Note | Low Limit | Priority
// --------------------------------------------------------------------------------------------------------------------------------------
// NodeStatus | 0 | n/a | | n/a | High
// TotalPeers | 0 peers | 1 peer | | 2 peers | Low
// LastHeightTime | n/a | 5 min | Just over 3 rounds at 20s blocks | 25 secs | High
// ValidatorStatus | n/a | not 1 | Monitor unexpected Pause or Unstaking | |
// BFTRound | n/a | 3 rounds | Soft = Just below the 'LastHeight' time | Round 1 | Medium
// BFTElectionTime | 2 secs | 1.5 secs | Hard = config, Soft = 75% of config timing | 1 sec | Medium
// BFTElectionVoteTime | 2 secs | 1.5 secs | Hard = config, Soft = 75% of config timing | 1 sec | Medium
// BFTProposeTime | 4 secs | 3 secs | Hard = config, Soft = 75% of config timing | 2 sec | High
// BFTProposeVoteTime | 4 secs | 3 secs | Hard = config, Soft = 75% of config timing | 2 sec | High
// BFTPrecommitTime | 2 secs | 1.5 secs | Hard = config, Soft = 75% of config timing | 1 sec | Medium
// BFTPrecommitVoteTime | 2 secs | 1.5 secs | Hard = config, Soft = 75% of config timing | 1 sec | Medium
// BFTCommitTime | 2 secs | 1.5 secs | Hard = config, Soft = 75% of config timing | 1 sec | Medium
// BFTCommitProcessTime | 2 secs | 1.5 secs | Hard = config, Soft = 75% of config timing | 1 sec | Medium
// NonSignerPercent | 33% | 10% | Hard = BFT upper bound | 5% | High
// LargestTxSize | 4KB | 3KB | Hard = default mempool config, Soft = 75% of hard | 2KB | Medium
// BlockSize | 1MB-1652B | 750KB | Hard = param - MaxBlockHeader, Soft = 75% of param | 500KB | Medium
// BlockProcessingTime | 4 secs | 3 secs | Hard = MIN(ProposeTimeoutMS, ProposeVoteTimeoutMS) | 2 secs | Medium
// BlockVDFIterations | n/a | 0 | Soft = unexpected behavior | n/a | Medium
// RootChainInfoTime | 2 secs | 1 sec | Hard = 10% of block time | 700ms | Medium
// DBPartitionTime | 10 min | 5 min | Hard = arbitrary / high likelihood of interruption | 2 min | Low
// DBPartitionEntries | 2,000,000 | 1,500,000 | Hard = Badger default limit (configurable) | 1,000,000 | Medium
// DBPartitionSize | 128MB | 75MB | Hard = Badger set limit (configurable) | 10 MB | Medium
// DBCommitTime | 3 secs | 2 secs | Hard = soft of BlockProcessingTime | 1.5 sec | Medium
// DBCommitEntries | 2,000,000 | 1,500,000 | Hard = Badger default limit (configurable) | 1,000,000 | Medium
// DBCommitSize | 128MB | 10MB | Hard = Badger set limit (configurable) | 1 MB | High
// MempoolSize | 10MB | 2MB | Hard = default config, Soft = 2 blocks | 500 KB | Low
// MempoolCount | 5,000 | 3,500 | Hard = default config, Soft = 75% of hard | 1,000 | LowHardLimit=Documentation only |
rem1niscence
approved these changes
Apr 29, 2025
Collaborator
rem1niscence
left a comment
There was a problem hiding this comment.
all good! just a single comment about the nil check on the metrics methods
| // UpdateMempoolMetrics() updates mempool telemetry | ||
| func (m *Metrics) UpdateMempoolMetrics(txCount, size int) { | ||
| // exit if empty | ||
| if m == nil { |
Collaborator
There was a problem hiding this comment.
I didn't catch this on the last review but on what case m could be nil? In theory you could call the method by passing m as nil but I don't see a case where that would be done
Collaborator
Author
There was a problem hiding this comment.
So if Metrics is set to nil, then these calls in code won't fail. (Like in testing or if disabled)
It's an alternative to nil checking everytime you do a call to metrics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Prometheus Metrics for Guard Rails Documentation
Description
This PR introduces Prometheus metrics for monitoring key blockchain performance indicators. The updated Guard Rails documentation now includes limits and alert recommendations for these metrics.
Why?
Closes
closes #151
Changes Summary
Added Prometheus metrics for:
Added documentation to reflect Prometheus-compatible monitoring