Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add more prometheus metrics to network::Protocol. #5145

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

twittner
Copy link
Contributor

@twittner twittner commented Mar 5, 2020

@twittner twittner added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes labels Mar 5, 2020
@gavofyork gavofyork merged commit 027756e into paritytech:master Mar 5, 2020
@twittner twittner deleted the more-metrics branch March 5, 2020 16:21
General-Beck pushed a commit to General-Beck/substrate that referenced this pull request Mar 6, 2020
fork_targets: self.fork_targets.len().try_into().unwrap_or(std::u32::MAX),
finality_proofs: self.extra_finality_proofs.metrics(),
justifications: self.extra_justifications.metrics(),
_priv: ()
Copy link
Contributor

Choose a reason for hiding this comment

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

@twittner am I understanding correctly that _priv is used to tell its consumer that the given structure might be extended in the future and that such an extension would not be a breaking change (see https://github.com/rust-lang/rfcs/blob/master/text/2008-non-exhaustive.md)?

Is this really necessary given that this is not exposed across crate boundaries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was added to ensure that any Metrics value anywhere outside this module was created here. #[non_exchaustive] only works for downstream crates. It is probably not really necessary so if you feel strongly about it free to remove it.

General-Beck pushed a commit to General-Beck/substrate that referenced this pull request Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants