pub struct EgressEvent {Show 14 fields
pub timestamp: String,
pub kind: &'static str,
pub correlation_id: String,
pub tool: ToolName,
pub url: String,
pub host: String,
pub method: String,
pub status: Option<u16>,
pub duration_ms: u64,
pub response_bytes: usize,
pub blocked: bool,
pub block_reason: Option<&'static str>,
pub caller_id: Option<String>,
pub hop: u8,
}Expand description
Outbound network call record emitted by HTTP-capable executors.
Serialized as a JSON Lines record onto the shared audit sink. Consumers
distinguish this record from AuditEntry by the presence of the kind
field (always "egress").
§Example JSON output
{"timestamp":"1712345678","kind":"egress","correlation_id":"a1b2c3d4-...","tool":"fetch",
"url":"https://example.com","host":"example.com","method":"GET","status":200,
"duration_ms":120,"response_bytes":4096}Fields§
§timestamp: StringUnix timestamp (seconds) when the request was issued.
kind: &'static strRecord-type discriminator — always "egress". Consumers distinguish
EgressEvent from AuditEntry by the presence of this field.
correlation_id: StringCorrelation id shared with the parent AuditEntry (UUIDv4, lowercased).
tool: ToolNameTool that issued the call ("web_scrape", "fetch", …).
url: StringDestination URL (after SSRF/domain validation).
host: StringHostname, denormalized for TUI aggregation.
method: StringHTTP method ("GET", "POST", …).
status: Option<u16>HTTP response status. None when the request failed pre-response.
duration_ms: u64Wall-clock duration from send to end-of-body, in milliseconds.
response_bytes: usizeBytes of response body received. Zero on pre-response failure or
when log_response_bytes = false.
blocked: boolWhether the request was blocked before connection.
block_reason: Option<&'static str>Block reason: "allowlist" | "blocklist" | "ssrf" | "scheme".
caller_id: Option<String>Caller identity propagated from ToolCall::caller_id.
hop: u8Redirect hop index (0 for the initial request). Distinguishes per-hop events
sharing the same correlation_id.
Implementations§
Source§impl EgressEvent
impl EgressEvent
Sourcepub fn new_correlation_id() -> String
pub fn new_correlation_id() -> String
Generate a new UUIDv4 correlation id for use across a tool call’s egress events.
Trait Implementations§
Source§impl Clone for EgressEvent
impl Clone for EgressEvent
Source§fn clone(&self) -> EgressEvent
fn clone(&self) -> EgressEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more