@@ -335,6 +335,7 @@ impl Piece {
335
335
) -> Result < impl AsyncRead > {
336
336
// Span record the piece_id.
337
337
Span :: current ( ) . record ( "piece_id" , piece_id) ;
338
+ Span :: current ( ) . record ( "piece_length" , length) ;
338
339
339
340
// Acquire the upload rate limiter.
340
341
if !disable_rate_limit {
@@ -366,6 +367,7 @@ impl Piece {
366
367
) -> Result < impl AsyncRead > {
367
368
// Span record the piece_id.
368
369
Span :: current ( ) . record ( "piece_id" , piece_id) ;
370
+ Span :: current ( ) . record ( "piece_length" , length) ;
369
371
370
372
// Acquire the download rate limiter.
371
373
if !disable_rate_limit {
@@ -409,6 +411,7 @@ impl Piece {
409
411
) -> Result < metadata:: Piece > {
410
412
// Span record the piece_id.
411
413
Span :: current ( ) . record ( "piece_id" , piece_id) ;
414
+ Span :: current ( ) . record ( "piece_length" , length) ;
412
415
413
416
// Record the start of downloading piece.
414
417
let piece = self
@@ -513,6 +516,7 @@ impl Piece {
513
516
) -> Result < metadata:: Piece > {
514
517
// Span record the piece_id.
515
518
Span :: current ( ) . record ( "piece_id" , piece_id) ;
519
+ Span :: current ( ) . record ( "piece_length" , length) ;
516
520
517
521
// Record the start of downloading piece.
518
522
let piece = self
@@ -696,6 +700,7 @@ impl Piece {
696
700
) -> Result < impl AsyncRead > {
697
701
// Span record the piece_id.
698
702
Span :: current ( ) . record ( "piece_id" , piece_id) ;
703
+ Span :: current ( ) . record ( "piece_length" , length) ;
699
704
700
705
// Acquire the upload rate limiter.
701
706
self . upload_rate_limiter . acquire ( length as usize ) . await ;
@@ -725,6 +730,7 @@ impl Piece {
725
730
) -> Result < impl AsyncRead > {
726
731
// Span record the piece_id.
727
732
Span :: current ( ) . record ( "piece_id" , piece_id) ;
733
+ Span :: current ( ) . record ( "piece_length" , length) ;
728
734
729
735
// Acquire the download rate limiter.
730
736
if !disable_rate_limit {
@@ -769,6 +775,7 @@ impl Piece {
769
775
) -> Result < metadata:: Piece > {
770
776
// Span record the piece_id.
771
777
Span :: current ( ) . record ( "piece_id" , piece_id) ;
778
+ Span :: current ( ) . record ( "piece_length" , length) ;
772
779
773
780
if is_prefetch {
774
781
// Acquire the prefetch rate limiter.
0 commit comments