Skip to content

fix: longer timeout better metrics #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/submit_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn send_transaction(provider: Provider, recipient_address: Address) {
let result = provider.send_transaction(tx).await.unwrap();

// wait for the transaction to mine
let receipt = match timeout(Duration::from_secs(60), result.get_receipt()).await {
let receipt = match timeout(Duration::from_secs(240), result.get_receipt()).await {
Ok(Ok(receipt)) => receipt,
Ok(Err(e)) => {
tracing::error!(error = ?e, "failed to get transaction receipt");
Expand All @@ -66,7 +66,7 @@ async fn send_transaction(provider: Provider, recipient_address: Address) {
// record metrics for how long it took to mine the transaction
let mine_time = dispatch_start_time.elapsed().as_secs();
tracing::debug!(success = receipt.status(), mine_time, hash, "transaction mined");
histogram!("integration.tx_mine_time").record(mine_time as f64);
histogram!("txn_submitter.tx_mine_time").record(mine_time as f64);
}

async fn connect_from_config() -> (Provider, Address, u64) {
Expand Down
Loading