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: Add per shard granularity for validator info #8934

Conversation

VanBarbascu
Copy link
Contributor

Count the number chunks produced and expected to be produced so far for each individual shard.
When one chunk producer is assigned to multiple shards, we can see the production / expected for each of the shard.

Tested on an RPC node in mainnet.
Paste from the metrics tab of a node in mainnet. link

@VanBarbascu VanBarbascu requested a review from a team as a code owner April 20, 2023 12:08
@akhi3030 akhi3030 requested a review from nikurt April 20, 2023 12:20
@akhi3030
Copy link
Collaborator

@nikurt: do you have the bandwidth to review this please?

@VanBarbascu VanBarbascu force-pushed the per_shard_granularity_for_validator_info branch from 18dd1db to 7b04386 Compare April 20, 2023 12:26
pub(crate) static VALIDATORS_CHUNKS_PRODUCED_BY_SHARD: Lazy<IntGaugeVec> = Lazy::new(|| {
try_create_int_gauge_vec(
"near_validators_chunks_produced_by_shard",
"Number of chunks produced by a validator",
Copy link
Contributor

Choose a reason for hiding this comment

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

Same description as the metric above.
Does this deprecate the other metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only if we can do sum by account_id in Graphana/ Prometheus. @vlad-kopcil wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From my searches online, you can do it. This means that we can deprecate the previous field. We will not do it in this PR because we need to figure out where it is used and migrate to the new metric.

Count the number chunks produced and expected to be produced so far for each
individual shard.
When one chunk producer is assigned to multiple shards, we can see the production / expected for each of the shard.

Tested on an RPC node in mainnet.
Paste from the metrics tab of a node in mainnet. [link](https://gist.github.com/VanBarbascu/26dc011291df7f128d609c8457d57469)
@VanBarbascu VanBarbascu force-pushed the per_shard_granularity_for_validator_info branch from 7b04386 to 8f284ee Compare April 20, 2023 14:30
@near-bulldozer near-bulldozer bot merged commit a808352 into near:master Apr 20, 2023
@VanBarbascu VanBarbascu deleted the per_shard_granularity_for_validator_info branch April 21, 2023 10:07
nikurt pushed a commit that referenced this pull request Apr 25, 2023
Count the number chunks produced and expected to be produced so far for each individual shard.
When one chunk producer is assigned to multiple shards, we can see the production / expected for each of the shard.

Tested on an RPC node in mainnet.
Paste from the metrics tab of a node in mainnet. [link](https://gist.github.com/VanBarbascu/26dc011291df7f128d609c8457d57469)
nikurt pushed a commit that referenced this pull request Apr 28, 2023
Count the number chunks produced and expected to be produced so far for each individual shard.
When one chunk producer is assigned to multiple shards, we can see the production / expected for each of the shard.

Tested on an RPC node in mainnet.
Paste from the metrics tab of a node in mainnet. [link](https://gist.github.com/VanBarbascu/26dc011291df7f128d609c8457d57469)
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.

None yet

3 participants