MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / append_agent_trace

Function append_agent_trace

atomic-agent/src/export.rs:227–232  ·  view source on GitHub ↗

Append a [`TraceRecord`] as a single JSON line to `{root}/.agent-trace/traces.jsonl`. Creates the directory and file if they don't exist. All errors are logged and swallowed — never blocks the caller.

(record: &TraceRecord, root: &Path)

Source from the content-addressed store, hash-verified

225/// Creates the directory and file if they don't exist. All errors are
226/// logged and swallowed — never blocks the caller.
227pub fn append_agent_trace(record: &TraceRecord, root: &Path) {
228 let result = try_append_agent_trace(record, root);
229 if let Err(e) = result {
230 log::warn!("agent-trace: failed to append record: {}", e);
231 }
232}
233
234// ---------------------------------------------------------------------------
235// Internal helpers

Calls 1

try_append_agent_traceFunction · 0.85