add --chain-id to sentryd
This commit is contained in:
parent
17c446b68c
commit
953bb27adc
|
@ -257,8 +257,6 @@ fn main() -> anyhow::Result<()> {
|
||||||
error!("Failed sending panic to pagerduty: {}", err);
|
error!("Failed sending panic to pagerduty: {}", err);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
} else {
|
|
||||||
info!("No pagerduty key. Using default panic handler");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up tokio's async runtime
|
// set up tokio's async runtime
|
||||||
|
|
|
@ -14,6 +14,10 @@ pub struct PagerdutySubCommand {
|
||||||
/// short description of the alert
|
/// short description of the alert
|
||||||
summary: String,
|
summary: String,
|
||||||
|
|
||||||
|
/// the chain id to require. Only used if not using --config.
|
||||||
|
#[argh(option)]
|
||||||
|
chain_id: Option<u64>,
|
||||||
|
|
||||||
#[argh(option)]
|
#[argh(option)]
|
||||||
/// the class/type of the event
|
/// the class/type of the event
|
||||||
class: Option<String>,
|
class: Option<String>,
|
||||||
|
@ -56,7 +60,7 @@ impl PagerdutySubCommand {
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
pagerduty_alert(
|
pagerduty_alert(
|
||||||
None,
|
self.chain_id,
|
||||||
self.class,
|
self.class,
|
||||||
"web3-proxy".to_string(),
|
"web3-proxy".to_string(),
|
||||||
None,
|
None,
|
||||||
|
|
Loading…
Reference in New Issue