mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 10:21:05 +00:00
Backing and collator protocol traces including para-id (#2620)
* improve backing/provisioner spans * span for collation requests * add para_id to unbacked candidate spans * differentiate validation-construction and find-assignment in selection * better find-assignment spans * organize unbacked-candidate spans directly under job root * Update node/core/provisioner/src/lib.rs Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
committed by
GitHub
parent
bdb3256396
commit
94d50afd4e
@@ -45,7 +45,7 @@
|
||||
//! ```
|
||||
|
||||
use sp_core::traits::SpawnNamed;
|
||||
use polkadot_primitives::v1::{CandidateHash, Hash, PoV, ValidatorIndex, BlakeTwo256, HashT};
|
||||
use polkadot_primitives::v1::{CandidateHash, Hash, PoV, ValidatorIndex, BlakeTwo256, HashT, Id as ParaId};
|
||||
use parity_scale_codec::Encode;
|
||||
use sc_network::PeerId;
|
||||
|
||||
@@ -204,6 +204,14 @@ impl SpanBuilder {
|
||||
self.span.add_string_tag("candidate-hash", &format!("{:?}", candidate_hash.0));
|
||||
self
|
||||
}
|
||||
|
||||
/// Attach a para-id to the span.
|
||||
#[inline(always)]
|
||||
pub fn with_para_id(mut self, para_id: ParaId) -> Self {
|
||||
self.span.add_para_id(para_id);
|
||||
self
|
||||
}
|
||||
|
||||
/// Attach a candidate stage.
|
||||
/// Should always come with a `CandidateHash`.
|
||||
#[inline(always)]
|
||||
@@ -305,6 +313,11 @@ impl Span {
|
||||
}
|
||||
}
|
||||
|
||||
/// Add the para-id to the span.
|
||||
pub fn add_para_id(&mut self, para_id: ParaId) {
|
||||
self.add_int_tag("para-id", u32::from(para_id) as i64);
|
||||
}
|
||||
|
||||
/// Add an additional tag to the span.
|
||||
pub fn add_string_tag(&mut self, tag: &str, value: &str) {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user