Skip to content

Commit

Permalink
chore(deps): bump metrics to 0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed May 30, 2024
1 parent 9a08ad7 commit 5b8b9c5
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 117 deletions.
125 changes: 69 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,6 @@ strum = "0.26"
rayon = "1.7"
itertools = "0.12"
parking_lot = "0.12"
# Needed for `metrics-macro` to resolve the crate using `::metrics` notation
metrics = "0.21.1"
modular-bitfield = "0.11.2"
once_cell = "1.17"
syn = "2.0"
Expand All @@ -373,6 +371,12 @@ sha2 = { version = "0.10", default-features = false }
paste = "1.0"
url = "2.3"

# metrics
metrics = "0.22.0"
metrics-exporter-prometheus = { version = "0.14.0", default-features = false }
metrics-util = "0.16.0"
metrics-process = "2.0.0"

# proc-macros
proc-macro2 = "1.0"
quote = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ confy.workspace = true
toml = { workspace = true, features = ["display"] }

# metrics
metrics-process = "=1.0.14"
metrics-process.workspace = true

# test vectors generation
proptest.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions crates/metrics/metrics-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ mod with_attrs;
/// impl Default for CustomMetrics {
/// fn default() -> Self {
/// Self {
/// gauge: metrics::register_gauge!("metrics_custom_gauge"),
/// gauge2: metrics::register_gauge!("metrics_custom_second_gauge"),
/// counter: metrics::register_counter!("metrics_custom_counter"),
/// histo: metrics::register_histogram!("metrics_custom_histogram"),
/// gauge: metrics::gauge!("metrics_custom_gauge"),
/// gauge2: metrics::gauge!("metrics_custom_second_gauge"),
/// counter: metrics::counter!("metrics_custom_counter"),
/// histo: metrics::histogram!("metrics_custom_histogram"),
/// }
/// }
/// }
Expand Down Expand Up @@ -115,7 +115,7 @@ mod with_attrs;
///
/// impl DynamicScopeMetrics {
/// pub fn new(scope: &str) -> Self {
/// Self { gauge: metrics::register_gauge!(format!("{}{}{}", scope, "_", "gauge")) }
/// Self { gauge: metrics::gauge!(format!("{}{}{}", scope, "_", "gauge")) }
/// }
///
/// pub fn describe(scope: &str) {
Expand Down
6 changes: 3 additions & 3 deletions crates/metrics/metrics-derive/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ impl<'a> Metric<'a> {
if let Type::Path(ref path_ty) = self.field.ty {
if let Some(last) = path_ty.path.segments.last() {
let registrar = match last.ident.to_string().as_str() {
COUNTER_TY => quote! { metrics::register_counter! },
HISTOGRAM_TY => quote! { metrics::register_histogram! },
GAUGE_TY => quote! { metrics::register_gauge! },
COUNTER_TY => quote! { metrics::counter! },
HISTOGRAM_TY => quote! { metrics::histogram! },
GAUGE_TY => quote! { metrics::gauge! },
_ => return Err(Error::new_spanned(path_ty, "Unsupported metric type")),
};

Expand Down
Loading

0 comments on commit 5b8b9c5

Please sign in to comment.