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

Function append_agent_trace

atomic-agent/src/export.rs:228–233  ·  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

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

Calls 1

try_append_agent_traceFunction · 0.85