Obsidian Metadata
| type | template |
Trace Logging Schema (starter)
A vendor-neutral starting schema that supports everything in this vault: error analysis, judges, handoff and workflow analysis, transition matrices. Adapt the names to your tracing tool (see Traces for vendor terminology).
{
"trace_id": "uuid", // one per user request/session
"session_id": "uuid", // groups multi-request sessions
"started_at": "ISO-8601", "ended_at": "ISO-8601",
"source": "production | synthetic | ci",
"metadata": {
"channel": "sms | voice | chat | email",
"user_type": "new | expert | ...", "persona": "...",
"feature": "...", "scenario": "...", // for synthetic/test data
"pipeline_version": "git-sha", "prompt_version": "...", "model": "provider/model@snapshot"
},
"events": [
{ "seq": 1, "type": "user_message", "source": "user", "content": "..." },
{ "seq": 2, "type": "llm_call", "source": "router_agent", "model": "...",
"input_ref": "...", "output": "...", "tokens_in": 0, "tokens_out": 0, "latency_ms": 0 },
{ "seq": 3, "type": "tool_call", "source": "router_agent", "tool": "search_listings",
"args": {}, "result": {}, "status": "ok | error", "error": null, "latency_ms": 0 },
{ "seq": 4, "type": "retrieval", "source": "retriever", "query": "...", "doc_ids": ["..."], "scores": [] },
{ "seq": 5, "type": "state_change", "source": "crm", "entity": "appointment", "before": {}, "after": {} },
{ "seq": 6, "type": "handoff", "source": "router_agent", "reason": "...",
"context_transferred": "...", "wait_time_s": 0, "human_actions": "...", "human_had_context": true },
{ "seq": 7, "type": "assistant_message", "source": "responder_agent", "content": "..." }
],
"outcome": { "goal_met": null, "business_result": "appointment_booked | ...", "resolved_by": "ai | human" },
"feedback": { "thumbs": null, "comment": null },
"evals": [ { "name": "tone_mismatch_judge@v3", "result": "Pass", "critique": "..." } ],
"annotations": [ { "reviewer": "...", "pass_fail": "Fail", "note": "...", "failure_modes": ["..."] } ]
}Checklist:
- Redact sensitive data before logging, and audit the redactor (Evals with Sensitive Data)
- Every event has
trace_id,source,seq - Tool calls log name, args, result, and resulting state
- Traces continue through human handoffs to resolution (Human Handoff Evaluation)
- Bulk export and annotation write-back are supported by your platform (Eval Tooling and Vendors)

