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

Enforce timeout & retries on alert_discord such that #75

Open
0ex-d opened this issue Jan 6, 2025 · 0 comments
Open

Enforce timeout & retries on alert_discord such that #75

0ex-d opened this issue Jan 6, 2025 · 0 comments

Comments

@0ex-d
Copy link
Contributor

0ex-d commented Jan 6, 2025

Currently we report panics to a crash.log file and give users an option to send it to discord for concrete logging.
Possible scenario the http request might fail or hog resources especially with it's blocking nature.

let client = reqwest::blocking::Client::new();
let result = client.post(webhook_url).json(&payload).send();
if let Err(err) = result {
error!(error=?err, "could not send alert to Discord\nMessage: {message}");
}

Solution:

  • Add timeout to limit resource consumption.
  • Use retry mechanism to ensure panics are reported reliably.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant