Add more metrics to prometheus (#5034)

* Add a few things

* Add finality_grandpa_round

* fix fg tests

* Nitpicks

* Nitpicks

* Fix name of prometheus crate
This commit is contained in:
Ashley
2020-03-03 11:36:58 +01:00
committed by GitHub
parent b27a820032
commit 883ddfc897
16 changed files with 135 additions and 24 deletions
+4
View File
@@ -41,6 +41,7 @@ use core::{fmt, iter};
use std::{future::Future, pin::Pin};
use std::{error::Error, fs, io::{self, Write}, net::Ipv4Addr, path::{Path, PathBuf}, sync::Arc};
use zeroize::Zeroize;
use prometheus_endpoint::Registry;
/// Network initialization parameters.
pub struct Params<B: BlockT, H: ExHashT> {
@@ -90,6 +91,9 @@ pub struct Params<B: BlockT, H: ExHashT> {
/// Type to check incoming block announcements.
pub block_announce_validator: Box<dyn BlockAnnounceValidator<B> + Send>,
/// Registry for recording prometheus metrics to.
pub metrics_registry: Option<Registry>,
}
bitflags! {