parent
19c1504c8f
commit
f017ffdffc
5 changed files with 9 additions and 9 deletions
|
@ -74,10 +74,10 @@ static ZED_CLIENT_CHECKSUM_SEED: LazyLock<Option<Vec<u8>>> = LazyLock::new(|| {
|
|||
})
|
||||
});
|
||||
|
||||
pub static SENTRY_MINIDUMP_ENDPOINT: LazyLock<Option<String>> = LazyLock::new(|| {
|
||||
option_env!("SENTRY_MINIDUMP_ENDPOINT")
|
||||
pub static MINIDUMP_ENDPOINT: LazyLock<Option<String>> = LazyLock::new(|| {
|
||||
option_env!("ZED_MINIDUMP_ENDPOINT")
|
||||
.map(|s| s.to_owned())
|
||||
.or_else(|| env::var("SENTRY_MINIDUMP_ENDPOINT").ok())
|
||||
.or_else(|| env::var("ZED_MINIDUMP_ENDPOINT").ok())
|
||||
});
|
||||
|
||||
static DOTNET_PROJECT_FILES_REGEX: LazyLock<Regex> = LazyLock::new(|| {
|
||||
|
|
|
@ -4,7 +4,7 @@ use backtrace::{self, Backtrace};
|
|||
use chrono::Utc;
|
||||
use client::{
|
||||
TelemetrySettings,
|
||||
telemetry::{self, SENTRY_MINIDUMP_ENDPOINT},
|
||||
telemetry::{self, MINIDUMP_ENDPOINT},
|
||||
};
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use futures::AsyncReadExt;
|
||||
|
@ -584,7 +584,7 @@ async fn upload_minidump(
|
|||
minidump: Vec<u8>,
|
||||
panic: Option<&Panic>,
|
||||
) -> Result<()> {
|
||||
let sentry_upload_url = SENTRY_MINIDUMP_ENDPOINT
|
||||
let minidump_endpoint = MINIDUMP_ENDPOINT
|
||||
.to_owned()
|
||||
.ok_or_else(|| anyhow::anyhow!("Minidump endpoint not set"))?;
|
||||
|
||||
|
@ -605,7 +605,7 @@ async fn upload_minidump(
|
|||
}
|
||||
|
||||
let mut response_text = String::new();
|
||||
let mut response = http.send_multipart_form(&sentry_upload_url, form).await?;
|
||||
let mut response = http.send_multipart_form(&minidump_endpoint, form).await?;
|
||||
response
|
||||
.body_mut()
|
||||
.read_to_string(&mut response_text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue