Skip to content

Commit f776d43

Browse files
authored
chore: bump sdk and add more tracing cleanup (#196)
1 parent 36daca9 commit f776d43

File tree

6 files changed

+37
-41
lines changed

6 files changed

+37
-41
lines changed

Cargo.lock

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "builder"
3-
version = "0.6.1"
3+
version = "0.6.2"
44
description = "signet builder example"
55

66
edition = "2024"

src/tasks/block/sim.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ impl SimulatorTask {
116116
///
117117
/// A `Result` containing the built block or an error.
118118
#[instrument(skip_all, fields(
119-
tx_count = sim_items.len(),
120-
millis_to_deadline = finish_by.duration_since(Instant::now()).as_millis()
119+
starting_cache_size = sim_items.len()
121120
))]
122121
pub async fn handle_build(
123122
&self,

src/tasks/cache/bundle.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use tokio::{
88
task::JoinHandle,
99
time::{self, Duration},
1010
};
11-
use tracing::{Instrument, debug, debug_span, error, trace};
11+
use tracing::{Instrument, debug, error, trace, trace_span};
1212

1313
/// Poll interval for the bundle poller in milliseconds.
1414
const POLL_INTERVAL_MS: u64 = 1000;
@@ -71,7 +71,7 @@ impl BundlePoller {
7171

7272
async fn task_future(mut self, outbound: UnboundedSender<TxCacheBundle>) {
7373
loop {
74-
let span = debug_span!("BundlePoller::loop", url = %self.config.tx_pool_url);
74+
let span = trace_span!("BundlePoller::loop", url = %self.config.tx_pool_url);
7575

7676
// Enter the span for the next check.
7777
let _guard = span.enter();
@@ -92,7 +92,7 @@ impl BundlePoller {
9292
.inspect_err(|err| debug!(%err, "Error fetching bundles"))
9393
{
9494
let _guard = span.entered();
95-
debug!(count = ?bundles.len(), "found bundles");
95+
trace!(count = ?bundles.len(), "found bundles");
9696
for bundle in bundles.into_iter() {
9797
if let Err(err) = outbound.send(bundle) {
9898
error!(err = ?err, "Failed to send bundle - channel is dropped");

src/tasks/cache/tx.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use reqwest::{Client, Url};
99
use serde::{Deserialize, Serialize};
1010
use std::time::Duration;
1111
use tokio::{sync::mpsc, task::JoinHandle, time};
12-
use tracing::{Instrument, debug, debug_span, trace};
12+
use tracing::{Instrument, debug, debug_span, trace, trace_span};
1313

1414
/// Poll interval for the transaction poller in milliseconds.
1515
const POLL_INTERVAL_MS: u64 = 1000;
@@ -114,19 +114,14 @@ impl TxPoller {
114114

115115
async fn task_future(mut self, outbound: mpsc::UnboundedSender<TxEnvelope>) {
116116
loop {
117-
let span = debug_span!("TxPoller::loop", url = %self.config.tx_pool_url);
118-
119-
// Enter the span for the next check.
120-
let _guard = span.enter();
117+
let span = trace_span!("TxPoller::loop", url = %self.config.tx_pool_url);
121118

122119
// Check this here to avoid making the web request if we know
123120
// we don't need the results.
124121
if outbound.is_closed() {
125122
trace!("No receivers left, shutting down");
126123
break;
127124
}
128-
// exit the span after the check.
129-
drop(_guard);
130125

131126
if let Ok(transactions) =
132127
self.check_tx_cache().instrument(span.clone()).await.inspect_err(|err| {

src/tasks/env.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ impl EnvTask {
307307
self.host_provider
308308
.get_block_by_number(host_block_number.into())
309309
.into_future()
310-
.instrument(debug_span!(parent: &span, "EnvTask::fetch_host_block")),
310+
.instrument(
311+
debug_span!(parent: &span, "EnvTask::fetch_host_block").or_current()
312+
),
311313
// We want to check that we're able to sign for the block we're gonna start building.
312314
// If not, we just want to skip all the work.
313315
self.quincey.preflight_check(host_block_number + 1).in_current_span(),

0 commit comments

Comments
 (0)