Add backtrace hash to collab server panic api

This commit is contained in:
Joseph T. Lyons 2023-12-18 11:12:23 -05:00
parent 02bcc7bbeb
commit 7cd6825eee
2 changed files with 4 additions and 2 deletions

View File

@ -117,12 +117,13 @@ struct CreateUserResponse {
struct Panic { struct Panic {
version: String, version: String,
release_channel: String, release_channel: String,
backtrace_hash: String,
text: String, text: String,
} }
#[instrument(skip(panic))] #[instrument(skip(panic))]
async fn trace_panic(panic: Json<Panic>) -> Result<()> { async fn trace_panic(panic: Json<Panic>) -> Result<()> {
tracing::error!(version = %panic.version, release_channel = %panic.release_channel, text = %panic.text, "panic report"); tracing::error!(version = %panic.version, release_channel = %panic.release_channel, backtrace_hash = %panic.backtrace_hash, text = %panic.text, "panic report");
Ok(()) Ok(())
} }

View File

@ -117,12 +117,13 @@ struct CreateUserResponse {
struct Panic { struct Panic {
version: String, version: String,
release_channel: String, release_channel: String,
backtrace_hash: String,
text: String, text: String,
} }
#[instrument(skip(panic))] #[instrument(skip(panic))]
async fn trace_panic(panic: Json<Panic>) -> Result<()> { async fn trace_panic(panic: Json<Panic>) -> Result<()> {
tracing::error!(version = %panic.version, release_channel = %panic.release_channel, text = %panic.text, "panic report"); tracing::error!(version = %panic.version, release_channel = %panic.release_channel, backtrace_hash = %panic.backtrace_hash, text = %panic.text, "panic report");
Ok(()) Ok(())
} }