(
name: impl Into<String>,
success: bool,
exit_code: i32,
duration: Duration,
output_bytes: usize,
metadata: Option<&serde_json::Value>,
)
| 35 | |
| 36 | impl TraceEvent { |
| 37 | pub fn tool_execution( |
| 38 | name: impl Into<String>, |
| 39 | success: bool, |
| 40 | exit_code: i32, |
| 41 | duration: Duration, |
| 42 | output_bytes: usize, |
| 43 | metadata: Option<&serde_json::Value>, |
| 44 | ) -> Self { |
| 45 | Self { |
| 46 | schema: TRACE_EVENT_SCHEMA.to_string(), |
| 47 | kind: TraceEventKind::ToolExecution, |
| 48 | name: name.into(), |
| 49 | success, |
| 50 | exit_code, |
| 51 | duration_ms: duration.as_millis().min(u128::from(u64::MAX)) as u64, |
| 52 | output_bytes, |
| 53 | metadata_keys: metadata_keys(metadata), |
| 54 | artifact_uris: artifact_uris(metadata), |
| 55 | details: None, |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | pub fn program_execution( |
| 60 | name: impl Into<String>, |
nothing calls this directly
no test coverage detected