Skip to content

Errors reported through sentry-tracing have unhelpful titles #723

Closed
@keabarnes

Description

@keabarnes

Environment

Version: 0.36.0

Sentry set up with the sentry-tracing integration.

Steps to Reproduce

  1. Followed instructions in the docs to track errors using the tracing macros: https://docs.rs/sentry-tracing/0.36.0/sentry_tracing/#tracking-errors
  2. Logged an error along the lines of tracing::error!(error = &custom_error as &dyn Error, "my operation failed - ...");
    1. tried with let custom_error = std::io::Error::new(std::io::ErrorKind::Other, "Custom ioErrorKind Other Error");
    2. tried with custom thiserror based error struct
  3. Logged a "control" error using error!("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 the tracing crate. Errors reported without the error = capturing method show up with the message in the title.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions