fix: Unify and fix indexer metrics. #314
Labels
No Label
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
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/go-ethereum#314
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "telackey/m2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.