Skip to content

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

crates/shared/src/price_estimation/buffered.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use {
2121
time::Duration,
2222
},
2323
tokio::{sync::broadcast, task::JoinHandle},
24+
tracing::instrument,
2425
};
2526

2627
/// Buffered configuration.
@@ -86,6 +87,7 @@ where
8687
Inner: NativePriceBatchFetching + NativePriceEstimating + 'static,
8788
{
8889
/// Request to get estimate prices in a batch
90+
#[instrument(skip_all)]
8991
fn estimate_native_price(
9092
&self,
9193
token: H160,

crates/shared/src/price_estimation/native_price_cache.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use {
1717
time::{Duration, Instant},
1818
},
1919
tokio::time,
20-
tracing::Instrument,
20+
tracing::{Instrument, instrument},
2121
};
2222

2323
#[derive(prometheus_metric_storage::MetricStorage)]
@@ -433,6 +433,7 @@ impl CachingNativePriceEstimator {
433433
}
434434

435435
impl NativePriceEstimating for CachingNativePriceEstimator {
436+
#[instrument(skip_all)]
436437
fn estimate_native_price(
437438
&self,
438439
token: H160,

crates/shared/src/price_estimation/sanitized.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use {
1414
model::order::BUY_ETH_ADDRESS,
1515
primitive_types::H160,
1616
std::sync::Arc,
17+
tracing::instrument,
1718
};
1819

1920
/// Verifies that buy and sell tokens are supported and handles
@@ -53,6 +54,7 @@ impl SanitizedPriceEstimator {
5354
}
5455

5556
impl PriceEstimating for SanitizedPriceEstimator {
57+
#[instrument(skip_all)]
5658
fn estimate(
5759
&self,
5860
query: Arc<Query>,

crates/shared/src/price_estimation/trade_finder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl TradeEstimator {
6363
}
6464

6565
impl Inner {
66+
#[instrument(skip_all)]
6667
async fn estimate(
6768
self: Arc<Self>,
6869
query: Arc<Query>,

crates/shared/src/trade_finding/external.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ impl TradeFinding for ExternalTradeFinder {
226226
})
227227
}
228228

229+
#[instrument(skip_all)]
229230
async fn get_trade(&self, query: &Query) -> Result<TradeKind, TradeError> {
230231
self.shared_query(query).await
231232
}

0 commit comments

Comments
 (0)