fix: Unify and fix indexer metrics. #314
Merged
telackey
merged 3 commits from 2023-02-07 22:26:36 +00:00
telackey/m2 into v1.10.26-statediff-v4
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
bug
critical
duplicate
enhancement
epic
help wanted
in progress
invalid
low priority
question
rebase
v1
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/go-ethereum#314
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The indexer metrics were not being exported properly (all timers and counters were always 0). On investigation, I found that the code was duplicated (triplicated?) across the various output modes: dump, file, sql.
This code is loaded whether or not that particular output mode is configured, and all these registered their metrics to the same registry under the same name. The result is that there is no way to determine which of those three metrics objects will actually be used at runtime for generating stats output, but you can assume it will be the wrong one (and in fact the odds are 2:1 against you).
This unifies the triplicated IndexerMetrics code and makes sure we end up with only one IndexerMetrics object.