mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
Pass Prometheus Registry into Client (#5120)
* Add a few metrics to Client * Improve PrometheusConfig * Fix client docs
This commit is contained in:
@@ -30,6 +30,7 @@ sc-state-db = { version = "0.8.0-alpha.2", path = "../state-db" }
|
||||
sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" }
|
||||
sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" }
|
||||
sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0-alpha.2", path = "../../utils/prometheus" }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" }
|
||||
|
||||
@@ -84,6 +84,7 @@ use crate::storage_cache::{CachingState, SharedCache, new_shared_cache};
|
||||
use crate::stats::StateUsageStats;
|
||||
use log::{trace, debug, warn};
|
||||
pub use sc_state_db::PruningMode;
|
||||
use prometheus_endpoint::Registry;
|
||||
|
||||
#[cfg(any(feature = "kvdb-rocksdb", test))]
|
||||
pub use bench::BenchmarkingState;
|
||||
@@ -291,6 +292,7 @@ pub fn new_client<E, S, Block, RA>(
|
||||
fork_blocks: ForkBlocks<Block>,
|
||||
bad_blocks: BadBlocks<Block>,
|
||||
execution_extensions: ExecutionExtensions<Block>,
|
||||
prometheus_registry: Option<Registry>,
|
||||
) -> Result<(
|
||||
sc_client::Client<
|
||||
Backend<Block>,
|
||||
@@ -317,6 +319,7 @@ pub fn new_client<E, S, Block, RA>(
|
||||
fork_blocks,
|
||||
bad_blocks,
|
||||
execution_extensions,
|
||||
prometheus_registry,
|
||||
)?,
|
||||
backend,
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user