Skip to content

Commit e2b4ea9

Browse files
committed
improve instrumentation
1 parent d7faeb1 commit e2b4ea9

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎crates/node/src/node.rs‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,14 @@ where
393393
sync_token,
394394
applied_rollup_height,
395395
);
396-
info!("journal sync started");
396+
info!(
397+
primary_height = checkpoints.primary.height,
398+
primary_hash = %checkpoints.primary.hash,
399+
fallback_height = checkpoints.fallback.height,
400+
fallback_hash = %checkpoints.fallback.hash,
401+
sources = ?self.config.journal().sources(),
402+
"journal sync started",
403+
);
397404

398405
let outcome = journal_sync_loop(
399406
&mut self.notifier,
@@ -559,7 +566,7 @@ where
559566
transactions: executed.transactions.iter().map(|tx| tx.inner().clone()).collect(),
560567
receipts: executed.receipts.clone(),
561568
};
562-
self.emit_journal(journal_bytes).await?;
569+
self.emit_journal(block_extracts.ru_height, journal_bytes).await?;
563570
self.storage.append_blocks(vec![executed]).await?;
564571
let _ = self.chain.send_new_block(notification);
565572
processed = true;
@@ -615,7 +622,7 @@ where
615622
/// only failure mode is the receiver being closed, which means the
616623
/// ingestion task has exited and the node cannot continue.
617624
#[instrument(skip(self, bytes), fields(len = bytes.len()))]
618-
async fn emit_journal(&self, bytes: Bytes) -> eyre::Result<()> {
625+
async fn emit_journal(&self, ru_height: u64, bytes: Bytes) -> eyre::Result<()> {
619626
self.journal_sender
620627
.send(bytes)
621628
.await

0 commit comments

Comments
 (0)