Function sentry::capture_event
source · [−]Expand description
Captures an event on the currently active client if any.
The event must already be assembled. Typically code would instead use
the utility methods like capture_exception
. The return value is the
event ID. In case Sentry is disabled the return value will be the nil
UUID (Uuid::nil
).
Example
use sentry::protocol::{Event, Level};
sentry::capture_event(Event {
message: Some("Hello World!".into()),
level: Level::Info,
..Default::default()
});