Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Update metrics #525

Merged
merged 4 commits into from
Sep 29, 2020
Merged

Update metrics #525

merged 4 commits into from
Sep 29, 2020

Conversation

ansermino
Copy link
Member

Changes

  • [TODO] Adds additional metrics from utils package
  • Migrate docs to separate markdown file

Closes: #?

@ansermino ansermino marked this pull request as ready for review September 29, 2020 13:36
chains/ethereum/listener.go Outdated Show resolved Hide resolved
ansermino and others added 2 commits September 29, 2020 11:44
Co-authored-by: Oleksii Matiiasevych <lastperson@gmail.com>
@@ -163,13 +167,15 @@ func (l *listener) pollBlocks() error {
l.log.Error("Failed to write to blockstore", "err", err)
}

if l.metrics != nil {
l.metrics.BlocksProcessed.Inc()
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a Q, if we were to need to reprocess blocks for some reason this counter could theoretically be larger than the latest processed block metric right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup! The blocks processed counter will also reset to 0 on restarts.

Copy link
Contributor

@steviezhang steviezhang Sep 29, 2020

Choose a reason for hiding this comment

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

do you think it might make more sense to specify that this is the blocks processed in a given "session" then in the docs? (votes submitted as well)

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really, this is almost always the case with counters such as this

@ansermino ansermino merged commit b1cc4f9 into master Sep 29, 2020
@ansermino ansermino deleted the david/update-metrics branch September 29, 2020 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants