chore: bump metrics (#4265)

This commit is contained in:
Alexey Shekhirin
2023-08-18 15:57:28 +01:00
committed by GitHub
parent efab153cd9
commit 2904745650
35 changed files with 113 additions and 117 deletions

102
Cargo.lock generated
View File

@ -3823,15 +3823,6 @@ dependencies = [
"linked-hash-map", "linked-hash-map",
] ]
[[package]]
name = "mach"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "mach2" name = "mach2"
version = "0.4.1" version = "0.4.1"
@ -3892,17 +3883,6 @@ dependencies = [
"autocfg", "autocfg",
] ]
[[package]]
name = "metrics"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849"
dependencies = [
"ahash 0.7.6",
"metrics-macros 0.6.0",
"portable-atomic 0.3.20",
]
[[package]] [[package]]
name = "metrics" name = "metrics"
version = "0.21.1" version = "0.21.1"
@ -3910,40 +3890,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5"
dependencies = [ dependencies = [
"ahash 0.8.3", "ahash 0.8.3",
"metrics-macros 0.7.0", "metrics-macros",
"portable-atomic 1.4.2", "portable-atomic",
] ]
[[package]] [[package]]
name = "metrics-exporter-prometheus" name = "metrics-exporter-prometheus"
version = "0.11.0" version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8603921e1f54ef386189335f288441af761e0fc61bcb552168d9cedfe63ebc70" checksum = "8a4964177ddfdab1e3a2b37aec7cf320e14169abb0ed73999f558136409178d5"
dependencies = [ dependencies = [
"base64 0.21.2",
"hyper", "hyper",
"indexmap 1.9.3", "indexmap 1.9.3",
"ipnet", "ipnet",
"metrics 0.20.1", "metrics",
"metrics-util", "metrics-util",
"parking_lot 0.12.1",
"portable-atomic 0.3.20",
"quanta", "quanta",
"thiserror", "thiserror",
"tokio", "tokio",
"tracing", "tracing",
] ]
[[package]]
name = "metrics-macros"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3"
dependencies = [
"proc-macro2 1.0.66",
"quote 1.0.32",
"syn 1.0.109",
]
[[package]] [[package]]
name = "metrics-macros" name = "metrics-macros"
version = "0.7.0" version = "0.7.0"
@ -3963,7 +3931,7 @@ checksum = "1c93f6ad342d3f7bc14724147e2dbc6eb6fdbe5a832ace16ea23b73618e8cc17"
dependencies = [ dependencies = [
"libproc", "libproc",
"mach2", "mach2",
"metrics 0.21.1", "metrics",
"once_cell", "once_cell",
"procfs", "procfs",
"rlimit", "rlimit",
@ -3972,20 +3940,18 @@ dependencies = [
[[package]] [[package]]
name = "metrics-util" name = "metrics-util"
version = "0.14.0" version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d24dc2dbae22bff6f1f9326ffce828c9f07ef9cc1e8002e5279f845432a30a" checksum = "111cb375987443c3de8d503580b536f77dc8416d32db62d9456db5d93bd7ac47"
dependencies = [ dependencies = [
"aho-corasick 0.7.20", "aho-corasick 0.7.20",
"crossbeam-epoch", "crossbeam-epoch",
"crossbeam-utils", "crossbeam-utils",
"hashbrown 0.12.3", "hashbrown 0.13.2",
"indexmap 1.9.3", "indexmap 1.9.3",
"metrics 0.20.1", "metrics",
"num_cpus", "num_cpus",
"ordered-float", "ordered-float",
"parking_lot 0.12.1",
"portable-atomic 0.3.20",
"quanta", "quanta",
"radix_trie", "radix_trie",
"sketches-ddsketch", "sketches-ddsketch",
@ -4360,9 +4326,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]] [[package]]
name = "ordered-float" name = "ordered-float"
version = "2.10.0" version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" checksum = "7417b1484e3641a8791af3c3123cdc083ac60a0d262a2f281b6125d58917caf4"
dependencies = [ dependencies = [
"num-traits", "num-traits",
] ]
@ -4689,15 +4655,6 @@ dependencies = [
"universal-hash", "universal-hash",
] ]
[[package]]
name = "portable-atomic"
version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e"
dependencies = [
"portable-atomic 1.4.2",
]
[[package]] [[package]]
name = "portable-atomic" name = "portable-atomic"
version = "1.4.2" version = "1.4.2"
@ -4926,16 +4883,16 @@ dependencies = [
[[package]] [[package]]
name = "quanta" name = "quanta"
version = "0.10.1" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7e31331286705f455e56cca62e0e717158474ff02b7936c1fa596d983f4ae27" checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab"
dependencies = [ dependencies = [
"crossbeam-utils", "crossbeam-utils",
"libc", "libc",
"mach", "mach2",
"once_cell", "once_cell",
"raw-cpuid", "raw-cpuid",
"wasi 0.10.2+wasi-snapshot-preview1", "wasi 0.11.0+wasi-snapshot-preview1",
"web-sys", "web-sys",
"winapi", "winapi",
] ]
@ -5254,6 +5211,7 @@ dependencies = [
"hyper", "hyper",
"jemalloc-ctl", "jemalloc-ctl",
"jemallocator", "jemallocator",
"metrics",
"metrics-exporter-prometheus", "metrics-exporter-prometheus",
"metrics-process", "metrics-process",
"metrics-util", "metrics-util",
@ -5327,6 +5285,7 @@ version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-util", "futures-util",
"metrics",
"reth-metrics", "reth-metrics",
"reth-payload-builder", "reth-payload-builder",
"reth-primitives", "reth-primitives",
@ -5346,6 +5305,7 @@ version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"assert_matches", "assert_matches",
"futures", "futures",
"metrics",
"reth-blockchain-tree", "reth-blockchain-tree",
"reth-consensus-common", "reth-consensus-common",
"reth-db", "reth-db",
@ -5376,6 +5336,7 @@ dependencies = [
"assert_matches", "assert_matches",
"linked_hash_set", "linked_hash_set",
"lru 0.10.1", "lru 0.10.1",
"metrics",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"reth-db", "reth-db",
"reth-interfaces", "reth-interfaces",
@ -5444,6 +5405,7 @@ dependencies = [
"futures", "futures",
"heapless", "heapless",
"iai", "iai",
"metrics",
"modular-bitfield", "modular-bitfield",
"page_size", "page_size",
"parity-scale-codec", "parity-scale-codec",
@ -5527,6 +5489,7 @@ dependencies = [
"futures", "futures",
"futures-util", "futures-util",
"itertools 0.11.0", "itertools 0.11.0",
"metrics",
"pin-project", "pin-project",
"rayon", "rayon",
"reth-db", "reth-db",
@ -5586,6 +5549,7 @@ dependencies = [
"futures", "futures",
"hex", "hex",
"hex-literal 0.3.4", "hex-literal 0.3.4",
"metrics",
"pin-project", "pin-project",
"proptest", "proptest",
"proptest-derive", "proptest-derive",
@ -5689,7 +5653,7 @@ name = "reth-metrics"
version = "0.1.0-alpha.6" version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"futures", "futures",
"metrics 0.20.1", "metrics",
"reth-metrics-derive", "reth-metrics-derive",
"tokio", "tokio",
] ]
@ -5698,7 +5662,7 @@ dependencies = [
name = "reth-metrics-derive" name = "reth-metrics-derive"
version = "0.1.0-alpha.6" version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"metrics 0.20.1", "metrics",
"once_cell", "once_cell",
"proc-macro2 1.0.66", "proc-macro2 1.0.66",
"quote 1.0.32", "quote 1.0.32",
@ -5749,6 +5713,7 @@ dependencies = [
"humantime-serde", "humantime-serde",
"linked-hash-map", "linked-hash-map",
"linked_hash_set", "linked_hash_set",
"metrics",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"pin-project", "pin-project",
"rand 0.8.5", "rand 0.8.5",
@ -5799,6 +5764,7 @@ name = "reth-payload-builder"
version = "0.1.0-alpha.6" version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"metrics",
"reth-interfaces", "reth-interfaces",
"reth-metrics", "reth-metrics",
"reth-primitives", "reth-primitives",
@ -5892,6 +5858,7 @@ version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"assert_matches", "assert_matches",
"itertools 0.11.0", "itertools 0.11.0",
"metrics",
"rayon", "rayon",
"reth-db", "reth-db",
"reth-interfaces", "reth-interfaces",
@ -5987,6 +5954,7 @@ dependencies = [
"jsonrpsee", "jsonrpsee",
"jsonwebtoken", "jsonwebtoken",
"lazy_static", "lazy_static",
"metrics",
"pin-project", "pin-project",
"rand 0.8.5", "rand 0.8.5",
"rayon", "rayon",
@ -6050,6 +6018,7 @@ version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"hyper", "hyper",
"jsonrpsee", "jsonrpsee",
"metrics",
"reth-beacon-consensus", "reth-beacon-consensus",
"reth-interfaces", "reth-interfaces",
"reth-ipc", "reth-ipc",
@ -6131,6 +6100,7 @@ dependencies = [
"criterion", "criterion",
"futures-util", "futures-util",
"itertools 0.11.0", "itertools 0.11.0",
"metrics",
"num-traits", "num-traits",
"paste", "paste",
"pin-project", "pin-project",
@ -6163,6 +6133,7 @@ version = "0.1.0-alpha.6"
dependencies = [ dependencies = [
"dyn-clone", "dyn-clone",
"futures-util", "futures-util",
"metrics",
"reth-metrics", "reth-metrics",
"thiserror", "thiserror",
"tokio", "tokio",
@ -6192,6 +6163,7 @@ dependencies = [
"criterion", "criterion",
"fnv", "fnv",
"futures-util", "futures-util",
"metrics",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"paste", "paste",
"proptest", "proptest",
@ -8196,12 +8168,6 @@ version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasi"
version = "0.10.2+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.11.0+wasi-snapshot-preview1" version = "0.11.0+wasi-snapshot-preview1"

View File

@ -38,7 +38,6 @@ reth-net-nat = { path = "../../crates/net/nat" }
reth-payload-builder.workspace = true reth-payload-builder.workspace = true
reth-basic-payload-builder = { path = "../../crates/payload/basic" } reth-basic-payload-builder = { path = "../../crates/payload/basic" }
reth-discv4 = { path = "../../crates/net/discv4" } reth-discv4 = { path = "../../crates/net/discv4" }
reth-metrics.workspace = true
reth-prune = { path = "../../crates/prune" } reth-prune = { path = "../../crates/prune" }
reth-trie = { path = "../../crates/trie" } reth-trie = { path = "../../crates/trie" }
@ -58,9 +57,11 @@ confy = "0.5"
toml = { version = "0.7", features = ["display"] } toml = { version = "0.7", features = ["display"] }
# metrics # metrics
metrics-exporter-prometheus = "0.11.0" metrics-exporter-prometheus = "0.12.1"
metrics-util = "0.14.0" metrics-util = "0.15.0"
metrics-process = "1.0.9" metrics-process = "1.0.9"
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# test vectors generation # test vectors generation
proptest.workspace = true proptest.workspace = true

View File

@ -7,7 +7,7 @@ use hyper::{
use metrics_exporter_prometheus::{PrometheusBuilder, PrometheusHandle}; use metrics_exporter_prometheus::{PrometheusBuilder, PrometheusHandle};
use metrics_util::layers::{PrefixLayer, Stack}; use metrics_util::layers::{PrefixLayer, Stack};
use reth_db::{database::Database, tables, DatabaseEnv}; use reth_db::{database::Database, tables, DatabaseEnv};
use reth_metrics::metrics::{self, absolute_counter, describe_counter, Unit}; use reth_metrics::metrics::{absolute_counter, describe_counter, Unit};
use std::{convert::Infallible, net::SocketAddr, sync::Arc}; use std::{convert::Infallible, net::SocketAddr, sync::Arc};
pub(crate) trait Hook: Fn() + Send + Sync {} pub(crate) trait Hook: Fn() + Send + Sync {}

View File

@ -18,7 +18,6 @@ normal = [
reth-primitives.workspace = true reth-primitives.workspace = true
reth-interfaces.workspace = true reth-interfaces.workspace = true
reth-db = { path = "../storage/db" } reth-db = { path = "../storage/db" }
reth-metrics = { workspace = true, features = ["common"] }
reth-provider.workspace = true reth-provider.workspace = true
reth-stages = { path = "../stages" } reth-stages = { path = "../stages" }
@ -27,7 +26,11 @@ parking_lot.workspace = true
lru = "0.10" lru = "0.10"
tracing.workspace = true tracing.workspace = true
# mics # metrics
reth-metrics = { workspace = true, features = ["common"] }
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc
aquamarine = "0.3.0" aquamarine = "0.3.0"
linked_hash_set = "0.1.4" linked_hash_set = "0.1.4"

View File

@ -1,5 +1,5 @@
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge}, metrics::{Counter, Gauge},
Metrics, Metrics,
}; };

View File

@ -18,7 +18,6 @@ reth-provider.workspace = true
reth-rpc-types.workspace = true reth-rpc-types.workspace = true
reth-tasks.workspace = true reth-tasks.workspace = true
reth-payload-builder.workspace = true reth-payload-builder.workspace = true
reth-metrics.workspace = true
reth-prune = { path = "../../prune" } reth-prune = { path = "../../prune" }
# async # async
@ -26,6 +25,10 @@ tokio = { workspace = true, features = ["sync"] }
tokio-stream.workspace = true tokio-stream.workspace = true
futures.workspace = true futures.workspace = true
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
tracing.workspace = true tracing.workspace = true
thiserror.workspace = true thiserror.workspace = true

View File

@ -1,5 +1,5 @@
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge}, metrics::{Counter, Gauge},
Metrics, Metrics,
}; };
use reth_primitives::{Header, SealedHeader, H256}; use reth_primitives::{Header, SealedHeader, H256};

View File

@ -1,5 +1,5 @@
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge, Histogram}, metrics::{Counter, Gauge, Histogram},
Metrics, Metrics,
}; };

View File

@ -13,7 +13,7 @@ description = "reth metrics utilities"
reth-metrics-derive = { path = "./metrics-derive" } reth-metrics-derive = { path = "./metrics-derive" }
# metrics # metrics
metrics = "0.20.1" metrics = "0.21.1"
# async # async
tokio = { workspace = true, features = ["full"], optional = true } tokio = { workspace = true, features = ["full"], optional = true }

View File

@ -18,6 +18,6 @@ regex = "1.6.0"
once_cell = "1.17.0" once_cell = "1.17.0"
[dev-dependencies] [dev-dependencies]
metrics = "0.20.1" metrics = "0.21.1"
trybuild = "1.0" trybuild = "1.0"
serial_test = "0.10" serial_test = "0.10"

View File

@ -14,7 +14,6 @@ reth-interfaces.workspace = true
reth-primitives.workspace = true reth-primitives.workspace = true
reth-db = { path = "../../storage/db" } reth-db = { path = "../../storage/db" }
reth-tasks.workspace = true reth-tasks.workspace = true
reth-metrics.workspace = true
# async # async
futures.workspace = true futures.workspace = true
@ -24,6 +23,10 @@ tokio = { workspace = true, features = ["sync"] }
tokio-stream.workspace = true tokio-stream.workspace = true
tokio-util = { workspace = true, features = ["codec"] } tokio-util = { workspace = true, features = ["codec"] }
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
tracing.workspace = true tracing.workspace = true
rayon.workspace = true rayon.workspace = true

View File

@ -1,6 +1,6 @@
use reth_interfaces::p2p::error::DownloadError; use reth_interfaces::p2p::error::DownloadError;
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge}, metrics::{Counter, Gauge},
Metrics, Metrics,
}; };

View File

@ -24,7 +24,10 @@ reth-rlp = { workspace = true, features = [
"ethereum-types", "ethereum-types",
"smol_str", "smol_str",
] } ] }
# metrics
reth-metrics.workspace = true reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# used for Chain and builders # used for Chain and builders
ethers-core = { workspace = true, default-features = false } ethers-core = { workspace = true, default-features = false }

View File

@ -9,7 +9,7 @@ use crate::{
use futures::{Sink, SinkExt, StreamExt}; use futures::{Sink, SinkExt, StreamExt};
use pin_project::pin_project; use pin_project::pin_project;
use reth_codecs::derive_arbitrary; use reth_codecs::derive_arbitrary;
use reth_metrics::metrics::{self, counter}; use reth_metrics::metrics::counter;
use reth_primitives::{ use reth_primitives::{
bytes::{Buf, BufMut, Bytes, BytesMut}, bytes::{Buf, BufMut, Bytes, BytesMut},
hex, hex,

View File

@ -31,7 +31,6 @@ reth-rlp-derive = { path = "../../rlp/rlp-derive" }
reth-tasks.workspace = true reth-tasks.workspace = true
reth-transaction-pool.workspace = true reth-transaction-pool.workspace = true
reth-provider.workspace = true reth-provider.workspace = true
reth-metrics = { workspace = true, features = ["common"] }
reth-rpc-types.workspace = true reth-rpc-types.workspace = true
# async/futures # async/futures
@ -46,6 +45,10 @@ serde = { workspace = true, optional = true }
humantime-serde = { version = "1.1", optional = true } humantime-serde = { version = "1.1", optional = true }
serde_json = { workspace = true, optional = true } serde_json = { workspace = true, optional = true }
# metrics
reth-metrics = { workspace = true, features = ["common"] }
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
auto_impl = "1" auto_impl = "1"
aquamarine = "0.3.0" aquamarine = "0.3.0"

View File

@ -1,6 +1,6 @@
use reth_eth_wire::DisconnectReason; use reth_eth_wire::DisconnectReason;
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge}, metrics::{Counter, Gauge},
Metrics, Metrics,
}; };

View File

@ -17,7 +17,6 @@ reth-rlp.workspace = true
reth-provider.workspace = true reth-provider.workspace = true
reth-payload-builder.workspace = true reth-payload-builder.workspace = true
reth-tasks.workspace = true reth-tasks.workspace = true
reth-metrics.workspace = true
## ethereum ## ethereum
revm.workspace = true revm.workspace = true
@ -27,5 +26,9 @@ tokio = { workspace = true, features = ["sync", "time"] }
futures-core = "0.3" futures-core = "0.3"
futures-util.workspace = true futures-util.workspace = true
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
## misc ## misc
tracing.workspace = true tracing.workspace = true

View File

@ -1,9 +1,6 @@
//! Metrics for the payload builder impl //! Metrics for the payload builder impl
use reth_metrics::{ use reth_metrics::{metrics::Counter, Metrics};
metrics::{self, Counter},
Metrics,
};
/// Transaction pool metrics /// Transaction pool metrics
#[derive(Metrics)] #[derive(Metrics)]

View File

@ -15,7 +15,6 @@ reth-rpc-types.workspace = true
reth-rlp.workspace = true reth-rlp.workspace = true
reth-interfaces.workspace = true reth-interfaces.workspace = true
reth-revm-primitives = { path = "../../revm/revm-primitives" } reth-revm-primitives = { path = "../../revm/revm-primitives" }
reth-metrics.workspace = true
## ethereum ## ethereum
revm-primitives.workspace = true revm-primitives.workspace = true
@ -25,6 +24,10 @@ tokio = { workspace = true, features = ["sync"] }
tokio-stream.workspace = true tokio-stream.workspace = true
futures-util.workspace = true futures-util.workspace = true
## metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
## misc ## misc
thiserror.workspace = true thiserror.workspace = true
sha2 = { version = "0.10", default-features = false } sha2 = { version = "0.10", default-features = false }

View File

@ -1,7 +1,7 @@
//! Payload builder service metrics. //! Payload builder service metrics.
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge}, metrics::{Counter, Gauge},
Metrics, Metrics,
}; };

View File

@ -16,7 +16,10 @@ reth-primitives.workspace = true
reth-db.workspace = true reth-db.workspace = true
reth-provider.workspace = true reth-provider.workspace = true
reth-interfaces.workspace = true reth-interfaces.workspace = true
# metrics
reth-metrics.workspace = true reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
tracing.workspace = true tracing.workspace = true

View File

@ -2,6 +2,6 @@ mod error;
mod metrics; mod metrics;
mod pruner; mod pruner;
use crate::metrics::Metrics;
pub use error::PrunerError; pub use error::PrunerError;
use metrics::Metrics;
pub use pruner::{BatchSizes, Pruner, PrunerResult, PrunerWithResult}; pub use pruner::{BatchSizes, Pruner, PrunerResult, PrunerWithResult};

View File

@ -21,7 +21,6 @@ reth-rpc-engine-api = { path = "../rpc-engine-api" }
reth-rpc-types.workspace = true reth-rpc-types.workspace = true
reth-tasks.workspace = true reth-tasks.workspace = true
reth-transaction-pool.workspace = true reth-transaction-pool.workspace = true
reth-metrics = { workspace = true, features = ["common"] }
# rpc/net # rpc/net
jsonrpsee = { workspace = true, features = ["server"] } jsonrpsee = { workspace = true, features = ["server"] }
@ -29,6 +28,10 @@ tower-http = { version = "0.4", features = ["full"] }
tower = { version = "0.4", features = ["full"] } tower = { version = "0.4", features = ["full"] }
hyper = "0.14" hyper = "0.14"
# metrics
reth-metrics = { workspace = true, features = ["common"] }
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
strum = { workspace = true, features = ["derive"] } strum = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }

View File

@ -3,7 +3,7 @@ use jsonrpsee::{
server::logger::{HttpRequest, Logger, MethodKind, Params, TransportProtocol}, server::logger::{HttpRequest, Logger, MethodKind, Params, TransportProtocol},
}; };
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Histogram}, metrics::{Counter, Histogram},
Metrics, Metrics,
}; };
use std::{net::SocketAddr, time::Instant}; use std::{net::SocketAddr, time::Instant};

View File

@ -22,7 +22,6 @@ reth-network-api.workspace = true
reth-rpc-engine-api = { path = "../rpc-engine-api" } reth-rpc-engine-api = { path = "../rpc-engine-api" }
reth-revm = { path = "../../revm" } reth-revm = { path = "../../revm" }
reth-tasks.workspace = true reth-tasks.workspace = true
reth-metrics.workspace = true
reth-consensus-common = { path = "../../consensus/common" } reth-consensus-common = { path = "../../consensus/common" }
reth-rpc-types-compat.workspace = true reth-rpc-types-compat.workspace = true
lazy_static = "*" lazy_static = "*"
@ -52,6 +51,11 @@ tokio-util = "0.7"
pin-project.workspace = true pin-project.workspace = true
rayon.workspace = true rayon.workspace = true
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc
bytes.workspace = true bytes.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }

View File

@ -1,7 +1,4 @@
use reth_metrics::{ use reth_metrics::{metrics::Gauge, Metrics};
metrics::{self, Gauge},
Metrics,
};
#[derive(Metrics)] #[derive(Metrics)]
#[metrics(scope = "rpc.eth_cache")] #[metrics(scope = "rpc.eth_cache")]

View File

@ -21,7 +21,6 @@ reth-interfaces.workspace = true
reth-db = { path = "../storage/db" } reth-db = { path = "../storage/db" }
reth-codecs = { path = "../storage/codecs" } reth-codecs = { path = "../storage/codecs" }
reth-provider.workspace = true reth-provider.workspace = true
reth-metrics.workspace = true
reth-trie = { path = "../trie" } reth-trie = { path = "../trie" }
# async # async
@ -37,6 +36,10 @@ tracing.workspace = true
# io # io
serde.workspace = true serde.workspace = true
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
thiserror.workspace = true thiserror.workspace = true
aquamarine = "0.3.0" aquamarine = "0.3.0"

View File

@ -81,7 +81,7 @@ pub mod stages;
pub mod sets; pub mod sets;
pub use crate::metrics::*;
pub use error::*; pub use error::*;
pub use metrics::*;
pub use pipeline::*; pub use pipeline::*;
pub use stage::*; pub use stage::*;

View File

@ -1,7 +1,4 @@
use reth_metrics::{ use reth_metrics::{metrics::Gauge, Metrics};
metrics::{self, Gauge},
Metrics,
};
use reth_primitives::stage::StageId; use reth_primitives::stage::StageId;
use std::collections::HashMap; use std::collections::HashMap;

View File

@ -14,7 +14,6 @@ reth-primitives.workspace = true
reth-interfaces.workspace = true reth-interfaces.workspace = true
reth-codecs = { path = "../codecs" } reth-codecs = { path = "../codecs" }
reth-libmdbx = { path = "../libmdbx-rs", optional = true, features = ["return-borrowed"] } reth-libmdbx = { path = "../libmdbx-rs", optional = true, features = ["return-borrowed"] }
reth-metrics.workspace = true
# codecs # codecs
serde = { workspace = true, default-features = false } serde = { workspace = true, default-features = false }
@ -31,6 +30,10 @@ secp256k1 = { workspace = true, default-features = false, features = [
], optional = true } ], optional = true }
modular-bitfield = "0.11.2" modular-bitfield = "0.11.2"
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
bytes.workspace = true bytes.workspace = true
page_size = "0.4.2" page_size = "0.4.2"

View File

@ -10,7 +10,7 @@ use crate::{
use parking_lot::RwLock; use parking_lot::RwLock;
use reth_interfaces::db::DatabaseWriteOperation; use reth_interfaces::db::DatabaseWriteOperation;
use reth_libmdbx::{ffi::DBI, EnvironmentKind, Transaction, TransactionKind, WriteFlags, RW}; use reth_libmdbx::{ffi::DBI, EnvironmentKind, Transaction, TransactionKind, WriteFlags, RW};
use reth_metrics::metrics::{self, histogram}; use reth_metrics::metrics::histogram;
use std::{marker::PhantomData, str::FromStr, sync::Arc, time::Instant}; use std::{marker::PhantomData, str::FromStr, sync::Arc, time::Instant};
/// Wrapper for the libmdbx transaction. /// Wrapper for the libmdbx transaction.

View File

@ -15,13 +15,14 @@ tokio = { workspace = true, features = ["sync", "rt"] }
tracing-futures = "0.2" tracing-futures = "0.2"
futures-util.workspace = true futures-util.workspace = true
## metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
## misc ## misc
tracing.workspace = true tracing.workspace = true
thiserror.workspace = true thiserror.workspace = true
dyn-clone = "1.0" dyn-clone = "1.0"
## rpc/metrics
reth-metrics.workspace = true
[dev-dependencies] [dev-dependencies]
tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread", "time", "macros"] } tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread", "time", "macros"] }

View File

@ -1,8 +1,5 @@
//! Task Executor Metrics //! Task Executor Metrics
use reth_metrics::{ use reth_metrics::{metrics::Counter, Metrics};
metrics::{self, Counter},
Metrics,
};
/// Task Executor Metrics /// Task Executor Metrics
#[derive(Metrics, Clone)] #[derive(Metrics, Clone)]

View File

@ -22,7 +22,6 @@ reth-primitives.workspace = true
reth-provider.workspace = true reth-provider.workspace = true
reth-interfaces.workspace = true reth-interfaces.workspace = true
reth-rlp.workspace = true reth-rlp.workspace = true
reth-metrics.workspace = true
reth-tasks.workspace = true reth-tasks.workspace = true
# async/futures # async/futures
@ -32,6 +31,10 @@ parking_lot.workspace = true
tokio = { workspace = true, default-features = false, features = ["sync"] } tokio = { workspace = true, default-features = false, features = ["sync"] }
tokio-stream.workspace = true tokio-stream.workspace = true
# metrics
reth-metrics.workspace = true
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
# misc # misc
aquamarine = "0.3.0" aquamarine = "0.3.0"
thiserror.workspace = true thiserror.workspace = true

View File

@ -1,7 +1,7 @@
//! Transaction pool metrics. //! Transaction pool metrics.
use reth_metrics::{ use reth_metrics::{
metrics::{self, Counter, Gauge}, metrics::{Counter, Gauge},
Metrics, Metrics,
}; };