-
Notifications
You must be signed in to change notification settings - Fork 115
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
Update metrics
to version 0.17
#2937
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just use the new String
support in metrics
.
This is a blocking change, because we risk breaking some metrics by manually tweaking expanded macro code.
2dec967
to
997954b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's delete an outdated comment.
997954b
to
ba31a5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version update is incomplete - other crates also use metrics.
For example:
zebra/zebra-network/Cargo.toml
Line 31 in a166964
metrics = "0.13.0-alpha.8" |
This is a merge blocker.
Please check for similar missed updates in other PRs.
You might find cargo deny check bans
useful here:
https://embarkstudios.github.io/cargo-deny/checks/bans/index.html#use-case---duplicate-version-detection
And also update the `metrics-exporter-prometheus` to version 0.6.1. These updates are to make sure Tokio 1 is supported.
Suggested by a Clippy lint.
`u64` isn't supported as the histogram data type in newer versions of `metrics`.
Remove all constants and use the new `metrics::incement_counter!` macro.
The snapshot string isn't included in the newer version of `metrics-exporter-prometheus`.
ba31a5b
to
5dd8d4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is missing metrics
updates in some Zebra crates.
This is a merge blocker.
Update other `zebra` crates so that only one version of `metrics` is used.
Oops, I had fixed this in my |
Use a strict version specification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependencies seem fine here.
cargo deny check bans
will find any duplicates as long as we put PR #2987 in the rollup PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Once this is merged, we will be able to delete https://github.com/ZcashFoundation/metrics 🎉 |
Merged through #2994. |
I archived the If we need to use it again, we should rename the main branch, so we keep the commits that older Zebra releases depend on. |
Motivation
This is part of the update to use Tokio version 1 (#2200), and must be merged together with the other PRs.
The version of the
metrics
crate used by Zebra doesn't support the new version of Tokio. More specifically,metrics
depends on Hyper 0.14, which has the same issue. Just like in #2936, either a new version of the runtime must run beside the old version of the runtime, or the dependency has to be updated.Solution
Update
metrics
to0.17.0
. This also requires themetrics-exporter-prometheus
to be updated to0.6.1
.Review
Anyone from the team can review this, but it shouldn't be merged yet.
Reviewer Checklist
Follow Up Work