getsentry / sentry-rust

Official Sentry SDK for Rust
https://sentry.io/
Apache License 2.0
620 stars 153 forks source link

Error events can silently be lost #613

Open svix-aaron1011 opened 1 year ago

svix-aaron1011 commented 1 year ago

Environment

sentry v0.31.5

Steps to Reproduce

There are multiple ways that Sentry can silently lose error events:

Expected Result

When using Sentry in production, it can be critical that any errors are either reported to sentry, or trigger some kind of error/panic indicating that an event was not reported.

It would be very useful for Sentry to:

loewenheim commented 1 year ago

Thank you for the report, we'll discuss it.

Swatinem commented 1 year ago

There is also the possibility of this being dropped in the transport due to rate limits and some such.

Ideally, all the capturing methods would a Future that resolves to a descriptive enum with various variants for the different reasons a message/exception might be lost. However, that would be quite deep change to how things are working right now, and would require lots of effort to make happen.

I don’t think the idea of an unbounded channel, or different channels for different event types makes sense. The transports are completely agnostic to that, as they are only dealing with opaque envelopes.