Skip to content

Commit aedccd9

Browse files
authored
feat: account fetch metrics fine-grained by RPC origin (#677)
1 parent 0cc6810 commit aedccd9

File tree

22 files changed

+524
-146
lines changed

22 files changed

+524
-146
lines changed

magicblock-aperture/src/requests/http/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use log::*;
1010
use magicblock_core::{
1111
link::transactions::SanitizeableTransaction, traits::AccountsBank,
1212
};
13-
use magicblock_metrics::metrics::ENSURE_ACCOUNTS_TIME;
13+
use magicblock_metrics::metrics::{AccountFetchOrigin, ENSURE_ACCOUNTS_TIME};
1414
use prelude::JsonBody;
1515
use solana_account::AccountSharedData;
1616
use solana_pubkey::Pubkey;
@@ -107,7 +107,7 @@ impl HttpDispatcher {
107107
.start_timer();
108108
let _ = self
109109
.chainlink
110-
.ensure_accounts(&[*pubkey], None)
110+
.ensure_accounts(&[*pubkey], None, AccountFetchOrigin::GetAccount)
111111
.await
112112
.inspect_err(|e| {
113113
// There is nothing we can do if fetching the account fails
@@ -129,7 +129,11 @@ impl HttpDispatcher {
129129
.start_timer();
130130
let _ = self
131131
.chainlink
132-
.ensure_accounts(pubkeys, None)
132+
.ensure_accounts(
133+
pubkeys,
134+
None,
135+
AccountFetchOrigin::GetMultipleAccounts,
136+
)
133137
.await
134138
.inspect_err(|e| {
135139
// There is nothing we can do if fetching the accounts fails

0 commit comments

Comments
 (0)