Skip to main content

Module monitoring

Module monitoring 

Source
Expand description

Log monitoring events and sinks.

MonitoringEvent is the structured record emitted for a log entry and ILogMonitor is the async sink that receives and flushes those events.

let event = MonitoringEvent {
    event_id: "evt-1".to_string(),
    timestamp: chrono::Utc::now(),
    duration_ms: None,
    level: LogLevel::Info,
    message: "started".to_string(),
    data: None,
    correlation_id: ctx.correlation_id(),
};
monitor.log(event).await?;

Structs§

MonitoringEvent
Structured log record sent to an ILogMonitor.

Enums§

LogLevel
Severity of a MonitoringEvent.

Traits§

ILogMonitor
Async sink for MonitoringEvent records.