sentry_core

Function 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());