mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-09 16:27:26 +00:00
Remove Prometheus metrics prefix (#9543)
* Remove Prometheus metrics prefix * Fix line widths * Missed some metrics * Fix CLI * Run rustfmt on modified files * Missing prefixes * Hopefully fix compilation * Rustfmt protocol.rs * Should compile now I guess * Rustfmt Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -36,7 +36,7 @@ pub use sc_telemetry::TelemetryEndpoints;
|
||||
pub use sc_transaction_pool::Options as TransactionPoolOptions;
|
||||
use sp_core::crypto::SecretString;
|
||||
use std::{
|
||||
io,
|
||||
io, iter,
|
||||
net::SocketAddr,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
@@ -188,10 +188,11 @@ impl PrometheusConfig {
|
||||
/// Create a new config using the default registry.
|
||||
///
|
||||
/// The default registry prefixes metrics with `substrate`.
|
||||
pub fn new_with_default_registry(port: SocketAddr) -> Self {
|
||||
pub fn new_with_default_registry(port: SocketAddr, chain_id: String) -> Self {
|
||||
let param = iter::once((String::from("chain"), chain_id)).collect();
|
||||
Self {
|
||||
port,
|
||||
registry: Registry::new_custom(Some("substrate".into()), None)
|
||||
registry: Registry::new_custom(None, Some(param))
|
||||
.expect("this can only fail if the prefix is empty"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user