Skip to content

Commit

Permalink
Add backtrace hash to collab server panic api (#3692)
Browse files Browse the repository at this point in the history
Release Notes:

- N/A
  • Loading branch information
JosephTLyons authored Dec 18, 2023
2 parents 488073d + 7cd6825 commit a623929
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/collab/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ struct CreateUserResponse {
struct Panic {
version: String,
release_channel: String,
backtrace_hash: String,
text: String,
}

#[instrument(skip(panic))]
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(())
}

Expand Down
4 changes: 3 additions & 1 deletion crates/collab2/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,14 @@ struct CreateUserResponse {
#[derive(Debug, Deserialize)]
struct Panic {
version: String,
release_channel: String,
backtrace_hash: String,
text: String,
}

#[instrument(skip(panic))]
async fn trace_panic(panic: Json<Panic>) -> Result<()> {
tracing::error!(version = %panic.version, 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(())
}

Expand Down

0 comments on commit a623929

Please sign in to comment.