mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
restructure polkadot-node-jaeger (#2642)
This commit is contained in:
committed by
GitHub
parent
59640a38bc
commit
ea6294fa79
@@ -505,7 +505,7 @@ async fn process_msg(
|
||||
DistributeCollation(receipt, pov, result_sender) => {
|
||||
let _span1 = state.span_per_relay_parent
|
||||
.get(&receipt.descriptor.relay_parent).map(|s| s.child("distributing-collation"));
|
||||
let _span2 = jaeger::pov_span(&pov, "distributing-collation");
|
||||
let _span2 = jaeger::Span::new(&pov, "distributing-collation");
|
||||
match state.collating_on {
|
||||
Some(id) if receipt.descriptor.para_id != id => {
|
||||
// If the ParaId of a collation requested to be distributed does not match
|
||||
|
||||
@@ -331,9 +331,8 @@ where
|
||||
from_collator: response_recv.boxed().fuse(),
|
||||
to_requester: result,
|
||||
span: state.span_per_relay_parent.get(&relay_parent).map(|s| {
|
||||
s.child_builder("collation-request")
|
||||
s.child("collation-request")
|
||||
.with_para_id(para_id)
|
||||
.build()
|
||||
}),
|
||||
|
||||
};
|
||||
@@ -695,7 +694,7 @@ where
|
||||
);
|
||||
|
||||
// Actual sending:
|
||||
let _span = jaeger::pov_span(&pov, "received-collation");
|
||||
let _span = jaeger::Span::new(&pov, "received-collation");
|
||||
let (mut tx, _) = oneshot::channel();
|
||||
std::mem::swap(&mut tx, &mut (per_req.to_requester));
|
||||
let result = tx.send((receipt, pov));
|
||||
@@ -1116,7 +1115,7 @@ mod tests {
|
||||
AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests(reqs, IfDisconnected::ImmediateError)
|
||||
) => {
|
||||
let req = reqs.into_iter().next()
|
||||
.expect("There should be exactly one request");
|
||||
.expect("There should be exactly one request");
|
||||
match req {
|
||||
Requests::CollationFetching(req) => {
|
||||
let payload = req.payload;
|
||||
@@ -1145,7 +1144,7 @@ mod tests {
|
||||
AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests(reqs, IfDisconnected::ImmediateError)
|
||||
) => {
|
||||
let req = reqs.into_iter().next()
|
||||
.expect("There should be exactly one request");
|
||||
.expect("There should be exactly one request");
|
||||
match req {
|
||||
Requests::CollationFetching(req) => {
|
||||
let payload = req.payload;
|
||||
|
||||
Reference in New Issue
Block a user