@@ -139,6 +139,7 @@ impl SubmitTask {
139
139
// Retry loop
140
140
let result = loop {
141
141
let span = debug_span ! (
142
+ parent: None ,
142
143
"SubmitTask::retrying_send" ,
143
144
retries = bumpable. bump_count( ) ,
144
145
nonce = bumpable. req( ) . nonce,
@@ -231,11 +232,13 @@ impl SubmitTask {
231
232
let host_block_number = self . constants . rollup_block_to_host_block_num ( ru_block_number) ;
232
233
233
234
let span = debug_span ! (
234
- "SubmitTask::loop" ,
235
+ parent: None ,
236
+ "SubmitTask::task_future::transaction_prep" ,
235
237
ru_block_number,
236
238
host_block_number,
237
239
block_tx_count = sim_result. block. tx_count( ) ,
238
240
) ;
241
+
239
242
let guard = span. enter ( ) ;
240
243
241
244
debug ! ( ru_block_number, "submit channel received block" ) ;
@@ -256,15 +259,16 @@ impl SubmitTask {
256
259
. instrument ( span. clone ( ) )
257
260
. await
258
261
else {
259
- let _guard = span. enter ( ) ;
260
- warn ! ( ru_block_number, host_block_number, "failed to get previous host block" ) ;
262
+ span. in_scope ( || {
263
+ warn ! ( ru_block_number, host_block_number, "failed to get previous host block" )
264
+ } ) ;
261
265
continue ;
262
266
} ;
263
267
264
268
// Prep the span we'll use for the transaction submission
265
269
let submission_span = debug_span ! (
266
270
parent: span,
267
- "SubmitTask::tx_submission " ,
271
+ "SubmitTask::task_future::transaction_submission " ,
268
272
tx_count = sim_result. block. tx_count( ) ,
269
273
host_block_number,
270
274
ru_block_number,
@@ -285,7 +289,9 @@ impl SubmitTask {
285
289
{
286
290
Ok ( bumpable) => bumpable,
287
291
Err ( error) => {
288
- error ! ( %error, "failed to prepare transaction for submission" ) ;
292
+ submission_span. in_scope ( || {
293
+ error ! ( %error, "failed to prepare transaction for submission" ) ;
294
+ } ) ;
289
295
continue ;
290
296
}
291
297
} ;
@@ -294,15 +300,19 @@ impl SubmitTask {
294
300
if let Err ( error) =
295
301
self . sim_with_call ( bumpable. req ( ) ) . instrument ( submission_span. clone ( ) ) . await
296
302
{
297
- error ! ( %error, "simulation failed for transaction" ) ;
303
+ submission_span. in_scope ( || {
304
+ error ! ( %error, "simulation failed for transaction" ) ;
305
+ } ) ;
298
306
continue ;
299
307
} ;
300
308
301
309
// Now send the transaction
302
310
if let Err ( error) =
303
311
self . retrying_send ( bumpable, 3 ) . instrument ( submission_span. clone ( ) ) . await
304
312
{
305
- error ! ( %error, "error dispatching block to host chain" ) ;
313
+ submission_span. in_scope ( || {
314
+ error ! ( %error, "error dispatching block to host chain" ) ;
315
+ } ) ;
306
316
continue ;
307
317
}
308
318
}
0 commit comments