Skip to content
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

feat: Sealevel RPC failure / success metrics and alerts #5434

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e136409
feat: move metrics out of ethers-prometheus
kamiyaa Feb 11, 2025
1b3b353
feat: Sealevel RPC failure / success metrics and alerts
kamiyaa Feb 11, 2025
a8ad352
docs: add comment
kamiyaa Feb 11, 2025
f50016c
refactor: pass in provider instead of rpc client
kamiyaa Feb 11, 2025
ca1e1a5
Merge branch 'main' into jeff/sealevel-metrics
kamiyaa Feb 11, 2025
983cb4a
Merge branch 'main' into jeff/sealevel-metrics-2
kamiyaa Feb 11, 2025
68111c0
Merge branch 'jeff/sealevel-metrics' into jeff/sealevel-metrics-2
kamiyaa Feb 13, 2025
0303585
refactor: use provider instead of rpc client in some instantiations
kamiyaa Feb 13, 2025
7a711e7
refactor: remove unused deps
kamiyaa Feb 13, 2025
5af9bbe
Merge branch 'jeff/sealevel-metrics' into jeff/sealevel-metrics-2
kamiyaa Feb 13, 2025
4bd36ac
refactor: remove hyperlane-core dep from metric
kamiyaa Feb 13, 2025
c95d0d2
refactor: rename to PrometheusConfig
kamiyaa Feb 13, 2025
5cfcaf8
Merge branch 'jeff/sealevel-metrics' into jeff/sealevel-metrics-2
kamiyaa Feb 13, 2025
00cd5a9
refactor: consolidate metric update logic into function
kamiyaa Feb 13, 2025
92dcf14
Merge branch 'main' into jeff/sealevel-metrics
kamiyaa Feb 14, 2025
ab4eeaa
feat: update to use solana's HttpSender
kamiyaa Feb 14, 2025
c3b3991
fix: update cargo patch
kamiyaa Feb 14, 2025
d1fc799
fix: remove unnecessary deps
kamiyaa Feb 14, 2025
d46057f
Merge branch 'main' into jeff/sealevel-metrics
kamiyaa Feb 17, 2025
d2d7fae
Merge branch 'main' into jeff/sealevel-metrics
kamiyaa Feb 17, 2025
e9734dd
refactor: rename rpc_metrics to client_metrics
kamiyaa Feb 17, 2025
62106e4
Merge branch 'jeff/sealevel-metrics' into jeff/sealevel-metrics-2
kamiyaa Feb 17, 2025
b874374
fix: build
kamiyaa Feb 17, 2025
69a81e4
fix: build
kamiyaa Feb 17, 2025
2e3fa78
refactor: add e2e metric check and address comments
kamiyaa Feb 17, 2025
3e336f5
refactor: move Mailbox instantiation into SealevelMailboxIndexer
kamiyaa Feb 18, 2025
7030a1b
Merge branch 'main' into jeff/sealevel-metrics-2
kamiyaa Feb 18, 2025
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
1 change: 1 addition & 0 deletions rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ COPY rust/main/applications rust/main/applications
COPY rust/main/chains rust/main/chains
COPY rust/main/hyperlane-base rust/main/hyperlane-base
COPY rust/main/hyperlane-core rust/main/hyperlane-core
COPY rust/main/hyperlane-metric rust/main/hyperlane-metric
COPY rust/main/hyperlane-test rust/main/hyperlane-test
COPY rust/main/ethers-prometheus rust/main/ethers-prometheus
COPY rust/main/utils rust/main/utils
Expand Down
69 changes: 44 additions & 25 deletions rust/main/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions rust/main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -242,42 +242,42 @@ version = "=0.5.2"

[patch.crates-io.solana-account-decoder]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-clap-utils]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-cli-config]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-client]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-program]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-sdk]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-transaction-status]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.solana-zk-token-sdk]
git = "https://github.com/hyperlane-xyz/solana.git"
tag = "hyperlane-1.14.13-2024-11-20"
tag = "hyperlane-1.14.13-2025-02-14"
version = "=1.14.13"

[patch.crates-io.spl-associated-token-account]
Expand Down
1 change: 1 addition & 0 deletions rust/main/chains/hyperlane-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ url.workspace = true

ethers-prometheus = { path = "../../ethers-prometheus", features = ["serde"] }
hyperlane-core = { path = "../../hyperlane-core", features = ["async"] }
hyperlane-metric = { path = "../../hyperlane-metric" }
hyperlane-operation-verifier = { path = "../../applications/hyperlane-operation-verifier" }
hyperlane-warp-route = { path = "../../applications/hyperlane-warp-route" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use serde_json::Value;
use tokio::time::sleep;
use tracing::{instrument, warn_span};

use ethers_prometheus::json_rpc_client::{JsonRpcBlockGetter, PrometheusJsonRpcClientConfigExt};
use ethers_prometheus::json_rpc_client::JsonRpcBlockGetter;
use hyperlane_metric::prometheus_metric::PrometheusConfigExt;

use crate::rpc_clients::{categorize_client_response, CategorizedResponse};

Expand All @@ -30,7 +31,7 @@ impl<C, B> Deref for EthereumFallbackProvider<C, B> {

impl<C, B> Debug for EthereumFallbackProvider<C, B>
where
C: JsonRpcClient + PrometheusJsonRpcClientConfigExt,
C: JsonRpcClient + PrometheusConfigExt,
{
#[allow(clippy::get_first)] // TODO: `rustc` 1.80.1 clippy issue
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Expand Down Expand Up @@ -78,7 +79,7 @@ impl<C> JsonRpcClient for EthereumFallbackProvider<C, JsonRpcBlockGetter<C>>
where
C: JsonRpcClient<Error = HttpClientError>
+ Into<JsonRpcBlockGetter<C>>
+ PrometheusJsonRpcClientConfigExt
+ PrometheusConfigExt
+ Clone,
JsonRpcBlockGetter<C>: BlockNumberGetter,
{
Expand Down Expand Up @@ -181,7 +182,7 @@ mod tests {
}
}

impl PrometheusJsonRpcClientConfigExt for EthereumProviderMock {
impl PrometheusConfigExt for EthereumProviderMock {
fn node_host(&self) -> &str {
todo!()
}
Expand All @@ -194,7 +195,7 @@ mod tests {
impl<C> EthereumFallbackProvider<C, JsonRpcBlockGetter<C>>
where
C: JsonRpcClient<Error = HttpClientError>
+ PrometheusJsonRpcClientConfigExt
+ PrometheusConfigExt
+ Into<JsonRpcBlockGetter<C>>
+ Clone,
JsonRpcBlockGetter<C>: BlockNumberGetter,
Expand Down
Loading
Loading