Skip to content

Enforce timeout & retries on alert_discord such that #75

@0ex-d

Description

@0ex-d

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions