-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Errors reported through sentry-tracing
have unhelpful titles
#723
Comments
Added some debug logging inside The code, roughly: let custom_error = MyError::MyFirstErrorVariant(format!(
"Testing Error"
));
error!(
error = &custom_error as &dyn std::error::Error,
"my operation failed - tracked error is unhelpful 1"
); The debug log of Event {
event_id: 41a06b12-023a-4abb-aef6-f1974f746410,
level: Error,
fingerprint: [
"{{ default }}",
],
culprit: None,
transaction: None,
message: None,
logentry: None,
logger: Some(
"utils::testing",
),
modules: {},
platform: "native",
timestamp: SystemTime {
tv_sec: 1737988217,
tv_nsec: 611486000,
},
server_name: Some(
"a765b20e-91fa-3110-b56f-dd6348032988",
),
release: Some(
"0.1.0",
),
dist: None,
environment: Some(
"dev",
),
user: None,
request: None,
contexts: {
"Rust Tracing Location": Other(
{
"file": String("/software/src/utils/testing.rs"),
"line": Number(30),
"module_path": String("utils::testing"),
},
),
"device": Device(),
"os": Os(),
"rust": Runtime(),
},
breadcrumbs: Values {
values: [...],
},
exception: Values {
values: [
Exception {
ty: "MyFirstErrorVariant",
value: Some(
"MyFirstErrorVairant's error message from #[error = ...] on thiserror stuct: Testing Error",
),
module: None,
stacktrace: None,
raw_stacktrace: None,
thread_id: None,
mechanism: None,
},
Exception {
ty: "tracing::error!",
value: Some(
"my operation failed - tracked error is unhelpful 1",
),
module: Some(
"utils::tesing",
),
stacktrace: None,
raw_stacktrace: None,
thread_id: None,
mechanism: Some(
Mechanism {
ty: "tracing",
description: None,
help_link: None,
handled: None,
synthetic: Some(
true,
),
data: {},
meta: MechanismMeta {
errno: None,
signal: None,
mach_exception: None,
},
},
),
},
],
},
stacktrace: None,
template: None,
threads: Values {
values: [...],
},
tags: {},
extra: {},
debug_meta: DebugMeta {
sdk_info: None,
images: [],
},
sdk: Some(
ClientSdkInfo {
name: "sentry.rust",
version: "0.36.0",
integrations: [
"attach-stacktrace",
"debug-images",
"contexts",
"panic",
"process-stacktrace",
],
packages: [
ClientSdkPackage {
name: "cargo:sentry",
version: "0.36.0",
},
],
},
),
} |
My gut says the part below shouldn't be there, and the exception.values: [
...,
Exception {
ty: "tracing::error!",
value: Some(
"my operation failed - tracked error is unhelpful 1",
),
module: Some(
"utils::tesing",
),
stacktrace: None,
raw_stacktrace: None,
thread_id: None,
mechanism: Some(
Mechanism {
ty: "tracing",
description: None,
help_link: None,
handled: None,
synthetic: Some(
true,
),
data: {},
meta: MechanismMeta {
errno: None,
signal: None,
mach_exception: None,
},
},
),
},
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Version:
0.36.0
Sentry set up with the
sentry-tracing
integration.Steps to Reproduce
tracing
macros: https://docs.rs/sentry-tracing/0.36.0/sentry_tracing/#tracking-errorstracing::error!(error = &custom_error as &dyn Error, "my operation failed - ...");
let custom_error = std::io::Error::new(std::io::ErrorKind::Other, "Custom ioErrorKind Other Error");
thiserror
based error structerror!("my operation failed - simple error!(\"my operation failed\") has helpful title");
Expected Result
Errors to show up in Sentry with a useful title, either based on the original message, or some version of the error struct name
Actual Result
In the Sentry dashboard, the errors reported using the
error =
capturing method had titles that had nothing to do with the error but rather referenced thetracing
crate. Errors reported without theerror =
capturing method show up with the message in the title.The text was updated successfully, but these errors were encountered: