From 953bb27adc63ed1600fa66300993bd161890078d Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 24 Jan 2023 04:17:39 -0800 Subject: [PATCH] add --chain-id to sentryd --- web3_proxy/src/bin/web3_proxy_cli/main.rs | 2 -- web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web3_proxy/src/bin/web3_proxy_cli/main.rs b/web3_proxy/src/bin/web3_proxy_cli/main.rs index a0aebbaa..da524b68 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/main.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/main.rs @@ -257,8 +257,6 @@ fn main() -> anyhow::Result<()> { error!("Failed sending panic to pagerduty: {}", err); } })); - } else { - info!("No pagerduty key. Using default panic handler"); } // set up tokio's async runtime diff --git a/web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs b/web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs index 4fadf11a..3c43daa3 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs @@ -14,6 +14,10 @@ pub struct PagerdutySubCommand { /// short description of the alert summary: String, + /// the chain id to require. Only used if not using --config. + #[argh(option)] + chain_id: Option, + #[argh(option)] /// the class/type of the event class: Option, @@ -56,7 +60,7 @@ impl PagerdutySubCommand { }) .unwrap_or_else(|| { pagerduty_alert( - None, + self.chain_id, self.class, "web3-proxy".to_string(), None,