mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +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
@@ -137,6 +137,9 @@ struct CollationRequest {
|
||||
|
||||
// The id of this request.
|
||||
request_id: RequestId,
|
||||
|
||||
// A jaeger span corresponding to the lifetime of the request.
|
||||
span: Option<jaeger::Span>,
|
||||
}
|
||||
|
||||
impl CollationRequest {
|
||||
@@ -147,11 +150,18 @@ impl CollationRequest {
|
||||
received,
|
||||
timeout,
|
||||
request_id,
|
||||
mut span,
|
||||
} = self;
|
||||
|
||||
match received.timeout(timeout).await {
|
||||
None => Timeout(request_id),
|
||||
Some(_) => Received(request_id),
|
||||
None => {
|
||||
span.as_mut().map(|s| s.add_string_tag("success", "false"));
|
||||
Timeout(request_id)
|
||||
}
|
||||
Some(_) => {
|
||||
span.as_mut().map(|s| s.add_string_tag("success", "true"));
|
||||
Received(request_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -466,6 +476,11 @@ where
|
||||
received: rx,
|
||||
timeout: state.request_timeout,
|
||||
request_id,
|
||||
span: state.span_per_relay_parent.get(&relay_parent).map(|s| {
|
||||
s.child_builder("collation-request")
|
||||
.with_para_id(para_id)
|
||||
.build()
|
||||
}),
|
||||
};
|
||||
|
||||
state.requested_collations.insert((relay_parent, para_id.clone(), peer_id.clone()), request_id);
|
||||
|
||||
Reference in New Issue
Block a user