[][src]Function sentry::capture_event

pub fn capture_event(event: Event<'static>) -> Uuid

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