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

feat(issue-12348): add validator index label to validator_statuses me… #14473

Merged
merged 8 commits into from
Nov 18, 2024

Conversation

0xste
Copy link
Contributor

@0xste 0xste commented Sep 24, 2024

What type of PR is this?
Feature

What does this PR do? Why is it needed?

  • We don't currently have a way to retrieve validator index from prometheus
  • It's useful for joining to various other metrics and, an example use-case is linking from a dashboard using the index as part of the target link i.e. https://beaconcha.in/validator/1101253 or joining with another metric to get additional metadata
  • This has been added to the existing validator_statuses metric:
    • We don't have a redundant info metric & associated cardinality
    • We make a non-breaking change to the metric contract for the existing validator_statuses metric by adding an additional label

Which issues(s) does this PR fix?
Fixes #12348

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have made an appropriate entry to CHANGELOG.md.
  • I have added a description to this PR with sufficient context for reviewers to understand this PR.

@0xste 0xste requested a review from a team as a code owner September 24, 2024 11:31
prestonvanloon
prestonvanloon previously approved these changes Sep 24, 2024
james-prysm
james-prysm previously approved these changes Nov 6, 2024
james-prysm
james-prysm previously approved these changes Nov 6, 2024
prestonvanloon
prestonvanloon previously approved these changes Nov 6, 2024
@james-prysm james-prysm dismissed stale reviews from prestonvanloon and themself via 634fab2 November 8, 2024 20:00
james-prysm
james-prysm previously approved these changes Nov 8, 2024
@james-prysm
Copy link
Contributor

looks like there is this panic error in e2e runs

panic: inconsistent label cardinality: expected 2 label values but got 1 in []string{"0xb7eaf282595bd590bde41f67783d12ccf7666aea2f1efbaeaa80c8478a157cf59ca7bf009e5a125163212b0b9f51c876"}

goroutine 307 [running]:
github.com/prometheus/client_golang/prometheus.(*GaugeVec).WithLabelValues(...)
	external/com_github_prometheus_client_golang/prometheus/gauge.go:238
github.com/prysmaticlabs/prysm/v5/validator/client.(*validator).logDuties(0xc00067c488, 0x0, {0xc000367b08, 0x80, 0x0?}, {0xc000499b08, 0x80, 0x0?})
	validator/client/validator.go:973 +0x17d6
github.com/prysmaticlabs/prysm/v5/validator/client.(*validator).UpdateDuties(0xc00067c488, {0x1aea038, 0xc000aec120}, 0x0)
	validator/client/validator.go:567 +0x75e
github.com/prysmaticlabs/prysm/v5/validator/client.run({0x1aea038, 0xc000aec120}, {0x1b0f4f0, 0xc00067c488})
	validator/client/runner.go:46 +0xe2
created by github.com/prysmaticlabs/prysm/v5/validator/client.(*ValidatorService).Start in goroutine 293
	validator/client/service.go:221 +0xd0b
	```

auto-merge was automatically disabled November 13, 2024 21:59

Head branch was pushed to by a user without write access

@0xste
Copy link
Contributor Author

0xste commented Nov 18, 2024

@james-prysm had missed the second invocation of WithLabelValues

I didn't find how to run e2e tests locally in the contributing guide

@james-prysm
Copy link
Contributor

@0xste you can run e2e with bazel bazel test //testing/endtoend:go_default_test --//proto:network=minimal --test_filter=TestEndToEnd_MinimalConfig --test_timeout=10000 --test_output=streamed --flaky_test_attempts=1

we should update that, will note

@james-prysm james-prysm added this pull request to the merge queue Nov 18, 2024
Merged via the queue into prysmaticlabs:develop with commit 00aeea3 Nov 18, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export metric for validator_identity and include index
3 participants