Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Additional Metrics collected and exposed via prometheus #5414

Merged
merged 37 commits into from
Apr 4, 2020
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6ca5356
Move metrics into its own module
gnunicorn Mar 26, 2020
419208f
Adding netstat tcp connection info to prometheus
gnunicorn Mar 26, 2020
f4430c1
adding system load
gnunicorn Mar 26, 2020
bde415b
Merge branch 'master' into ben-extra-promotheus-info
gnunicorn Mar 26, 2020
aad15a2
naming
gnunicorn Mar 26, 2020
5ab4aed
Add generic internals tracking facility, track tokio threads
gnunicorn Mar 26, 2020
7e86115
Generic Tracing Unbound Infrastructure
gnunicorn Mar 26, 2020
f6b48f1
Generic measuring of unbounded channels
gnunicorn Mar 26, 2020
21ae12f
separate mpsc channels from other internals
gnunicorn Mar 26, 2020
393f079
track block import times
gnunicorn Mar 27, 2020
e54dae4
fix typo
gnunicorn Mar 27, 2020
cf3f02e
cleaning up
gnunicorn Mar 27, 2020
fbe3a0d
more detailed info on unix systems
gnunicorn Mar 27, 2020
a383484
Merge remote-tracking branch 'origin/master' into ben-extra-promotheu…
gnunicorn Mar 30, 2020
895f96e
minor fix
gnunicorn Mar 30, 2020
ecf427e
use proper statics
gnunicorn Mar 30, 2020
9e1cd70
clean up
gnunicorn Apr 1, 2020
21d0dff
Merge remote-tracking branch 'origin/master' into ben-extra-promotheu…
gnunicorn Apr 1, 2020
7f079ce
Histogram is too slow, using our ring-buffered channel for it
gnunicorn Apr 1, 2020
475206c
track number of leaves / forks on chain
gnunicorn Apr 1, 2020
c7bf2c8
fix warnings and tests
gnunicorn Apr 2, 2020
2aa5ed8
Merge remote-tracking branch 'origin/master' into ben-extra-promotheu…
gnunicorn Apr 2, 2020
9d83980
drop our own block import tracer
gnunicorn Apr 2, 2020
e6e4d85
fix tests
gnunicorn Apr 2, 2020
694faf3
naming things
gnunicorn Apr 2, 2020
002b5ba
Merge remote-tracking branch 'origin/master' into ben-extra-promotheu…
gnunicorn Apr 2, 2020
5f44e0c
Apply suggestions from code review
gnunicorn Apr 3, 2020
9537ef1
incr separate counters
gnunicorn Apr 3, 2020
d3dedba
take leaves out of block info
gnunicorn Apr 3, 2020
9f3370f
license, wording and spaces
gnunicorn Apr 3, 2020
7745e6e
make channels counter feature flagged, too
gnunicorn Apr 3, 2020
15e609d
derive the clone
gnunicorn Apr 3, 2020
502d397
spaces and words
gnunicorn Apr 3, 2020
6fe049a
netstat is only supported on unix and windows
gnunicorn Apr 3, 2020
75cad68
missed one
gnunicorn Apr 3, 2020
56e4562
no attrs on if yet
gnunicorn Apr 3, 2020
8188c4f
Merge remote-tracking branch 'origin/master' into ben-extra-promotheu…
gnunicorn Apr 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
601 changes: 365 additions & 236 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ members = [
"primitives/test-primitives",
"primitives/transaction-pool",
"primitives/trie",
"primitives/utils",
"primitives/wasm-interface",
"test-utils/client",
"test-utils/runtime",
Expand Down
1 change: 1 addition & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ sp-std = { version = "2.0.0-alpha.5", path = "../primitives/std" }
sp-version = { version = "2.0.0-alpha.5", path = "../primitives/version" }
sp-api = { version = "2.0.0-alpha.5", path = "../primitives/api" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../primitives/runtime" }
sp-utils = { version = "2.0.0-alpha.5", path = "../primitives/utils" }
sp-blockchain = { version = "2.0.0-alpha.5", path = "../primitives/blockchain" }
sp-state-machine = { version = "0.8.0-alpha.5", path = "../primitives/state-machine" }
sc-telemetry = { version = "2.0.0-alpha.5", path = "telemetry" }
Expand Down
2 changes: 2 additions & 0 deletions client/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ sp-keyring = { version = "2.0.0-alpha.5", path = "../../primitives/keyring" }
kvdb = "0.5.0"
log = { version = "0.4.8" }
parking_lot = "0.10.0"
lazy_static = "1.4.0"
sp-core = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/core" }
sp-std = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/std" }
sp-version = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/version" }
sp-api = { version = "2.0.0-alpha.5", path = "../../primitives/api" }
sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils" }
sp-runtime = { version = "2.0.0-alpha.5", default-features = false, path = "../../primitives/runtime" }
sp-state-machine = { version = "0.8.0-alpha.5", path = "../../primitives/state-machine" }
sc-telemetry = { version = "2.0.0-alpha.5", path = "../telemetry" }
Expand Down
6 changes: 3 additions & 3 deletions client/api/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//! A set of APIs supported by the client along with their primitives.

use std::{fmt, collections::HashSet};
use futures::channel::mpsc;
use sp_core::storage::StorageKey;
use sp_runtime::{
traits::{Block as BlockT, NumberFor},
Expand All @@ -28,13 +27,14 @@ use sp_consensus::BlockOrigin;

use crate::blockchain::Info;
use crate::notifications::StorageEventStream;
use sp_utils::mpsc::TracingUnboundedReceiver;
use sp_blockchain;

/// Type that implements `futures::Stream` of block import events.
pub type ImportNotifications<Block> = mpsc::UnboundedReceiver<BlockImportNotification<Block>>;
pub type ImportNotifications<Block> = TracingUnboundedReceiver<BlockImportNotification<Block>>;

/// A stream of block finality notifications.
pub type FinalityNotifications<Block> = mpsc::UnboundedReceiver<FinalityNotification<Block>>;
pub type FinalityNotifications<Block> = TracingUnboundedReceiver<FinalityNotification<Block>>;

/// Expected hashes of blocks at given heights.
///
Expand Down
8 changes: 4 additions & 4 deletions client/api/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use std::{
};

use fnv::{FnvHashSet, FnvHashMap};
use futures::channel::mpsc;
use sp_core::storage::{StorageKey, StorageData};
use sp_runtime::traits::Block as BlockT;
use sp_utils::mpsc::{TracingUnboundedSender, TracingUnboundedReceiver, tracing_unbounded};

/// Storage change set
#[derive(Debug)]
Expand Down Expand Up @@ -67,7 +67,7 @@ impl StorageChangeSet {
}

/// Type that implements `futures::Stream` of storage change events.
pub type StorageEventStream<H> = mpsc::UnboundedReceiver<(H, StorageChangeSet)>;
pub type StorageEventStream<H> = TracingUnboundedReceiver<(H, StorageChangeSet)>;

type SubscriberId = u64;

Expand All @@ -82,7 +82,7 @@ pub struct StorageNotifications<Block: BlockT> {
FnvHashSet<SubscriberId>
)>,
sinks: FnvHashMap<SubscriberId, (
mpsc::UnboundedSender<(Block::Hash, StorageChangeSet)>,
TracingUnboundedSender<(Block::Hash, StorageChangeSet)>,
Option<HashSet<StorageKey>>,
Option<HashMap<StorageKey, Option<HashSet<StorageKey>>>>,
)>,
Expand Down Expand Up @@ -299,7 +299,7 @@ impl<Block: BlockT> StorageNotifications<Block> {


// insert sink
let (tx, rx) = mpsc::unbounded();
let (tx, rx) = tracing_unbounded("mpsc_storage_notification_items");
self.sinks.insert(current_id, (tx, keys, child_keys));
rx
}
Expand Down
1 change: 1 addition & 0 deletions client/authority-discovery/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl<Block: BlockT> HeaderBackend<Block> for TestApi {
finalized_hash: Default::default(),
finalized_number: Zero::zero(),
genesis_hash: Default::default(),
number_leaves: Default::default(),
}
}

Expand Down
1 change: 1 addition & 0 deletions client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ sc-client-api = { version = "2.0.0-alpha.5", path = "../api" }
sp-blockchain = { version = "2.0.0-alpha.5", path = "../../primitives/blockchain" }
sc-network = { version = "0.8.0-alpha.5", path = "../network" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../../primitives/runtime" }
sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils" }
sp-core = { version = "2.0.0-alpha.5", path = "../../primitives/core" }
sc-service = { version = "0.8.0-alpha.5", default-features = false, path = "../service" }
sp-state-machine = { version = "0.8.0-alpha.5", path = "../../primitives/state-machine" }
Expand Down
8 changes: 8 additions & 0 deletions client/cli/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use futures::{Future, future, future::FutureExt};
use futures::select;
use futures::pin_mut;
use sc_service::{AbstractService, Configuration};
use sp_utils::metrics::{TOKIO_THREADS_ALIVE, TOKIO_THREADS_TOTAL};
use crate::error;

#[cfg(target_family = "unix")]
Expand Down Expand Up @@ -73,6 +74,13 @@ fn build_runtime() -> Result<tokio::runtime::Runtime, std::io::Error> {
tokio::runtime::Builder::new()
.thread_name("main-tokio-")
.threaded_scheduler()
gnunicorn marked this conversation as resolved.
Show resolved Hide resolved
.on_thread_start(||{
TOKIO_THREADS_ALIVE.inc();
TOKIO_THREADS_TOTAL.inc();
})
.on_thread_stop(||{
TOKIO_THREADS_ALIVE.dec();
})
.enable_all()
.build()
}
Expand Down
1 change: 1 addition & 0 deletions client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ impl<Block: BlockT> sc_client::blockchain::HeaderBackend<Block> for BlockchainDb
genesis_hash: meta.genesis_hash,
finalized_hash: meta.finalized_hash,
finalized_number: meta.finalized_number,
number_leaves: self.leaves.read().count(),
}
}

Expand Down
1 change: 1 addition & 0 deletions client/db/src/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ impl<Block> BlockchainHeaderBackend<Block> for LightStorage<Block>
genesis_hash: meta.genesis_hash,
finalized_hash: meta.finalized_hash,
finalized_number: meta.finalized_number,
number_leaves: 1,
}
}

Expand Down
1 change: 1 addition & 0 deletions client/finality-grandpa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ assert_matches = "1.3.0"
parity-scale-codec = { version = "1.3.0", features = ["derive"] }
sp-arithmetic = { version = "2.0.0-alpha.5", path = "../../primitives/arithmetic" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../../primitives/runtime" }
sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils" }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../primitives/consensus/common" }
sp-core = { version = "2.0.0-alpha.5", path = "../../primitives/core" }
sp-api = { version = "2.0.0-alpha.5", path = "../../primitives/api" }
Expand Down
8 changes: 4 additions & 4 deletions client/finality-grandpa/src/communication/gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ use sp_finality_grandpa::AuthorityId;

use sc_telemetry::{telemetry, CONSENSUS_DEBUG};
use log::{trace, debug};
use futures::channel::mpsc;
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
use prometheus_endpoint::{CounterVec, Opts, PrometheusError, register, Registry, U64};
use rand::seq::SliceRandom;

Expand Down Expand Up @@ -1233,7 +1233,7 @@ impl Metrics {
pub(super) struct GossipValidator<Block: BlockT> {
inner: parking_lot::RwLock<Inner<Block>>,
set_state: environment::SharedVoterSetState<Block>,
report_sender: mpsc::UnboundedSender<PeerReport>,
report_sender: TracingUnboundedSender<PeerReport>,
metrics: Option<Metrics>,
}

Expand All @@ -1245,7 +1245,7 @@ impl<Block: BlockT> GossipValidator<Block> {
config: crate::Config,
set_state: environment::SharedVoterSetState<Block>,
prometheus_registry: Option<&Registry>,
) -> (GossipValidator<Block>, mpsc::UnboundedReceiver<PeerReport>) {
) -> (GossipValidator<Block>, TracingUnboundedReceiver<PeerReport>) {
let metrics = match prometheus_registry.map(Metrics::register) {
Some(Ok(metrics)) => Some(metrics),
Some(Err(e)) => {
Expand All @@ -1255,7 +1255,7 @@ impl<Block: BlockT> GossipValidator<Block> {
None => None,
};

let (tx, rx) = mpsc::unbounded();
let (tx, rx) = tracing_unbounded("mpsc_grandpa_gossip_validator");
let val = GossipValidator {
inner: parking_lot::RwLock::new(Inner::new(config)),
set_state,
Expand Down
3 changes: 2 additions & 1 deletion client/finality-grandpa/src/communication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ use gossip::{
use sp_finality_grandpa::{
AuthorityPair, AuthorityId, AuthoritySignature, SetId as SetIdNumber, RoundNumber,
};
use sp_utils::mpsc::TracingUnboundedReceiver;

pub mod gossip;
mod periodic;
Expand Down Expand Up @@ -165,7 +166,7 @@ pub(crate) struct NetworkBridge<B: BlockT, N: Network<B>> {
// thus one has to wrap gossip_validator_report_stream with an `Arc` `Mutex`. Given that it is
// just an `UnboundedReceiver`, one could also switch to a multi-producer-*multi*-consumer
// channel implementation.
gossip_validator_report_stream: Arc<Mutex<mpsc::UnboundedReceiver<PeerReport>>>,
gossip_validator_report_stream: Arc<Mutex<TracingUnboundedReceiver<PeerReport>>>,
}

impl<B: BlockT, N: Network<B>> Unpin for NetworkBridge<B, N> {}
Expand Down
10 changes: 6 additions & 4 deletions client/finality-grandpa/src/communication/periodic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
//! Periodic rebroadcast of neighbor packets.

use futures_timer::Delay;
use futures::{channel::mpsc, future::{FutureExt as _}, prelude::*, ready, stream::Stream};
use futures::{future::{FutureExt as _}, prelude::*, ready, stream::Stream};
use log::debug;
use std::{pin::Pin, task::{Context, Poll}, time::Duration};
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};

use sc_network::PeerId;
use sp_runtime::traits::{NumberFor, Block as BlockT};
Expand All @@ -31,7 +32,7 @@ const REBROADCAST_AFTER: Duration = Duration::from_secs(2 * 60);
/// A sender used to send neighbor packets to a background job.
#[derive(Clone)]
pub(super) struct NeighborPacketSender<B: BlockT>(
mpsc::UnboundedSender<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>
TracingUnboundedSender<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>
);

impl<B: BlockT> NeighborPacketSender<B> {
Expand All @@ -54,14 +55,15 @@ impl<B: BlockT> NeighborPacketSender<B> {
pub(super) struct NeighborPacketWorker<B: BlockT> {
last: Option<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>,
delay: Delay,
rx: mpsc::UnboundedReceiver<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>,
rx: TracingUnboundedReceiver<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>,
}

impl<B: BlockT> Unpin for NeighborPacketWorker<B> {}

impl<B: BlockT> NeighborPacketWorker<B> {
pub(super) fn new() -> (Self, NeighborPacketSender<B>){
let (tx, rx) = mpsc::unbounded::<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>();
let (tx, rx) = tracing_unbounded::<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>
("mpsc_grandpa_neighbor_packet_worker");
let delay = Delay::new(REBROADCAST_AFTER);

(NeighborPacketWorker {
Expand Down
12 changes: 6 additions & 6 deletions client/finality-grandpa/src/communication/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! Tests for the communication portion of the GRANDPA crate.

use futures::channel::mpsc;
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
use futures::prelude::*;
use sc_network::{Event as NetworkEvent, PeerId, config::Roles};
use sc_network_test::{Block, Hash};
Expand All @@ -33,20 +33,20 @@ use super::{AuthorityId, VoterSet, Round, SetId};

#[derive(Debug)]
pub(crate) enum Event {
EventStream(mpsc::UnboundedSender<NetworkEvent>),
EventStream(TracingUnboundedSender<NetworkEvent>),
WriteNotification(sc_network::PeerId, Vec<u8>),
Report(sc_network::PeerId, sc_network::ReputationChange),
Announce(Hash),
}

#[derive(Clone)]
pub(crate) struct TestNetwork {
sender: mpsc::UnboundedSender<Event>,
sender: TracingUnboundedSender<Event>,
}

impl sc_network_gossip::Network<Block> for TestNetwork {
fn event_stream(&self) -> Pin<Box<dyn Stream<Item = NetworkEvent> + Send>> {
let (tx, rx) = mpsc::unbounded();
let (tx, rx) = tracing_unbounded("test");
let _ = self.sender.unbounded_send(Event::EventStream(tx));
Box::pin(rx)
}
Expand Down Expand Up @@ -97,7 +97,7 @@ impl sc_network_gossip::ValidatorContext<Block> for TestNetwork {
pub(crate) struct Tester {
pub(crate) net_handle: super::NetworkBridge<Block, TestNetwork>,
gossip_validator: Arc<GossipValidator<Block>>,
pub(crate) events: mpsc::UnboundedReceiver<Event>,
pub(crate) events: TracingUnboundedReceiver<Event>,
}

impl Tester {
Expand Down Expand Up @@ -161,7 +161,7 @@ pub(crate) fn make_test_network() -> (
impl Future<Output = Tester>,
TestNetwork,
) {
let (tx, rx) = mpsc::unbounded();
let (tx, rx) = tracing_unbounded("test");
let net = TestNetwork { sender: tx };

#[derive(Clone)]
Expand Down
6 changes: 3 additions & 3 deletions client/finality-grandpa/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use std::{sync::Arc, collections::HashMap};

use log::{debug, trace, info};
use parity_scale_codec::Encode;
use futures::channel::mpsc;
use parking_lot::RwLockWriteGuard;

use sp_blockchain::{BlockStatus, well_known_cache_keys};
use sc_client_api::{backend::Backend, utils::is_descendent_of};
use sp_utils::mpsc::TracingUnboundedSender;
use sp_api::{TransactionFor};

use sp_consensus::{
Expand Down Expand Up @@ -57,7 +57,7 @@ pub struct GrandpaBlockImport<Backend, Block: BlockT, Client, SC> {
inner: Arc<Client>,
select_chain: SC,
authority_set: SharedAuthoritySet<Block::Hash, NumberFor<Block>>,
send_voter_commands: mpsc::UnboundedSender<VoterCommand<Block::Hash, NumberFor<Block>>>,
send_voter_commands: TracingUnboundedSender<VoterCommand<Block::Hash, NumberFor<Block>>>,
consensus_changes: SharedConsensusChanges<Block::Hash, NumberFor<Block>>,
authority_set_hard_forks: HashMap<Block::Hash, PendingChange<Block::Hash, NumberFor<Block>>>,
_phantom: PhantomData<Backend>,
Expand Down Expand Up @@ -536,7 +536,7 @@ impl<Backend, Block: BlockT, Client, SC> GrandpaBlockImport<Backend, Block, Clie
inner: Arc<Client>,
select_chain: SC,
authority_set: SharedAuthoritySet<Block::Hash, NumberFor<Block>>,
send_voter_commands: mpsc::UnboundedSender<VoterCommand<Block::Hash, NumberFor<Block>>>,
send_voter_commands: TracingUnboundedSender<VoterCommand<Block::Hash, NumberFor<Block>>>,
consensus_changes: SharedConsensusChanges<Block::Hash, NumberFor<Block>>,
authority_set_hard_forks: Vec<(SetId, PendingChange<Block::Hash, NumberFor<Block>>)>,
) -> GrandpaBlockImport<Backend, Block, Client, SC> {
Expand Down
12 changes: 6 additions & 6 deletions client/finality-grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
use futures::prelude::*;
use futures::StreamExt;
use log::{debug, info};
use futures::channel::mpsc;
use sc_client_api::{
backend::{AuxStore, Backend},
LockImportRun, BlockchainEvents, CallExecutor,
Expand All @@ -70,6 +69,7 @@ use sc_keystore::KeyStorePtr;
use sp_inherents::InherentDataProviders;
use sp_consensus::{SelectChain, BlockImport};
use sp_core::Pair;
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver};
use sc_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG};
use serde_json;

Expand Down Expand Up @@ -379,7 +379,7 @@ pub struct LinkHalf<Block: BlockT, C, SC> {
client: Arc<C>,
select_chain: SC,
persistent_data: PersistentData<Block>,
voter_commands_rx: mpsc::UnboundedReceiver<VoterCommand<Block::Hash, NumberFor<Block>>>,
voter_commands_rx: TracingUnboundedReceiver<VoterCommand<Block::Hash, NumberFor<Block>>>,
}

/// Provider for the Grandpa authority set configured on the genesis block.
Expand Down Expand Up @@ -476,7 +476,7 @@ where
}
)?;

let (voter_commands_tx, voter_commands_rx) = mpsc::unbounded();
let (voter_commands_tx, voter_commands_rx) = tracing_unbounded("mpsc_grandpa_voter_command");

// create pending change objects with 0 delay and enacted on finality
// (i.e. standard changes) for each authority set hard fork.
Expand Down Expand Up @@ -598,7 +598,7 @@ pub struct GrandpaParams<Block: BlockT, C, N, SC, VR> {
/// The inherent data providers.
pub inherent_data_providers: InherentDataProviders,
/// If supplied, can be used to hook on telemetry connection established events.
pub telemetry_on_connect: Option<futures::channel::mpsc::UnboundedReceiver<()>>,
pub telemetry_on_connect: Option<TracingUnboundedReceiver<()>>,
/// A voting rule used to potentially restrict target votes.
pub voting_rule: VR,
/// The prometheus metrics registry.
Expand Down Expand Up @@ -718,7 +718,7 @@ impl Metrics {
struct VoterWork<B, Block: BlockT, C, N: NetworkT<Block>, SC, VR> {
voter: Pin<Box<dyn Future<Output = Result<(), CommandOrError<Block::Hash, NumberFor<Block>>>> + Send>>,
env: Arc<Environment<B, Block, C, N, SC, VR>>,
voter_commands_rx: mpsc::UnboundedReceiver<VoterCommand<Block::Hash, NumberFor<Block>>>,
voter_commands_rx: TracingUnboundedReceiver<VoterCommand<Block::Hash, NumberFor<Block>>>,
network: NetworkBridge<Block, N>,

/// Prometheus metrics.
Expand All @@ -742,7 +742,7 @@ where
select_chain: SC,
voting_rule: VR,
persistent_data: PersistentData<Block>,
voter_commands_rx: mpsc::UnboundedReceiver<VoterCommand<Block::Hash, NumberFor<Block>>>,
voter_commands_rx: TracingUnboundedReceiver<VoterCommand<Block::Hash, NumberFor<Block>>>,
prometheus_registry: Option<prometheus_endpoint::Registry>,
) -> Self {
let metrics = match prometheus_registry.as_ref().map(Metrics::register) {
Expand Down
Loading