Function sentry_core::last_event_id
source · pub fn last_event_id() -> Option<Uuid>
Expand description
Returns the last event ID captured.
This uses the current thread local Hub
, and will return None
if no
event has been captured yet on this Hub
.
§Examples
use sentry::protocol::Level;
use sentry::types::Uuid;
assert_eq!(sentry::last_event_id(), None);
sentry::capture_message("some message", Level::Info);
assert!(sentry::last_event_id().is_some());