Closed ferologics closed 1 year ago
You should be able to turn of automatic error capturing with the builder methods, like so:
sentry_actix::Sentry::builder().capture_server_errors(false).finish()
That should give you Hub isolation and more metadata on the scope for each request, as well as the option to start a performance monitoring transaction with start_transaction(true)
.
thank you @Swatinem, this is exactly the kind of answer i was hoping for, we deployed the change and will be testing how it does over then next week 🤞
so far seems to be working well, thanks!
We're using
sentry-rust
with Actix-web and thetracing
integration. We've encountered an issue where Sentry traces for errors contain breadcrumbs from multiple incoming requests. Our goal is to ensure that breadcrumbs are associated only with the specific request that generated them, similar to the behavior of tracing-actix-web.We've considered using
sentry-actix
, but we want finer control over error reporting and prefer sending errors viatracing::error!()
.One approach we've looked into is creating a custom middleware to manage the Sentry hub and scope across threads. However, this feels somewhat manual and might not be the most efficient solution.
Is there a recommended or more streamlined way to achieve isolated breadcrumbs per request without relying on
sentry-actix
's automatic error reporting?