pub struct TelemetryEvent {Show 15 fields
pub timestamp: DateTime<Utc>,
pub tenant_id: Option<String>,
pub mission_id: Option<String>,
pub task_id: Option<String>,
pub agent_id: Option<String>,
pub parent_agent_id: Option<String>,
pub lineage_id: Option<String>,
pub worker_id: Option<String>,
pub trace_id: Option<String>,
pub event_type: String,
pub lifecycle_mode: Option<String>,
pub risk_level: Option<String>,
pub status: String,
pub cost_usd: f64,
pub additional: HashMap<String, String>,
}Expand description
A structured telemetry event for observability pipeline consumption.
Follows the Claw10 Telemetry Specification (PRD §36). Required fields: timestamp, event_type, status. Optional fields for correlation: tenant_id, mission_id, task_id, agent_id, etc.
Fields§
§timestamp: DateTime<Utc>§tenant_id: Option<String>§mission_id: Option<String>§task_id: Option<String>§agent_id: Option<String>§parent_agent_id: Option<String>§lineage_id: Option<String>§worker_id: Option<String>§trace_id: Option<String>§event_type: String§lifecycle_mode: Option<String>§risk_level: Option<String>§status: String§cost_usd: f64§additional: HashMap<String, String>Implementations§
Source§impl TelemetryEvent
impl TelemetryEvent
pub fn new(event_type: impl Into<String>, status: impl Into<String>) -> Self
pub fn with_tenant_id(self, tenant_id: String) -> Self
pub fn with_mission_id(self, mission_id: String) -> Self
pub fn with_task_id(self, task_id: String) -> Self
pub fn with_agent_id(self, agent_id: String) -> Self
pub fn with_parent_agent_id(self, parent_agent_id: String) -> Self
pub fn with_lineage_id(self, lineage_id: String) -> Self
pub fn with_worker_id(self, worker_id: String) -> Self
pub fn with_trace_id(self, trace_id: String) -> Self
pub fn with_lifecycle_mode(self, lifecycle_mode: String) -> Self
pub fn with_risk_level(self, risk_level: String) -> Self
pub fn with_cost(self, cost_usd: f64) -> Self
pub fn with_additional(self, key: String, value: String) -> Self
Trait Implementations§
Source§impl Clone for TelemetryEvent
impl Clone for TelemetryEvent
Source§fn clone(&self) -> TelemetryEvent
fn clone(&self) -> TelemetryEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TelemetryEvent
impl Debug for TelemetryEvent
Auto Trait Implementations§
impl Freeze for TelemetryEvent
impl RefUnwindSafe for TelemetryEvent
impl Send for TelemetryEvent
impl Sync for TelemetryEvent
impl Unpin for TelemetryEvent
impl UnsafeUnpin for TelemetryEvent
impl UnwindSafe for TelemetryEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more