Expand description
HTTP API contract for the Trace Infra service.
§Why trace is its own service and not part of History Infra
Conversation messages and trace events look similar on the wire and behave nothing alike:
| Conversation | Trace | |
|---|---|---|
| Replayed into a model prompt | yes | never |
| Losing one record | loses user work | acceptable |
| Volume | one per turn | many per turn |
| Retention | durable | short |
Sharing one store would force the stricter guarantee onto high-volume diagnostic data, and — worse — put events one filtering mistake away from being replayed as conversation. Separate services keep that impossible by construction.
§Layering
agent-trace-contract paths + DTOs + redaction (this crate)
agent-trace-runtime store implementation
agent-trace-server router + auth + binSee api.md for the full HTTP reference.
Structs§
- ApiError
- Error body shared by every non-2xx response.
- Append
Events Request - Append
Response - Result of an append.
skippedcounts ids that already existed, so a caller can tell a fresh write from a deduplicated retry. - Events
Response - Events in chronological order, oldest first.
- Runtime
Event Record - One runtime trace event.
- Search
Events Request - Trace
Scope - Identifies what a trace event belongs to.
Constants§
- AUDIENCE
- DEFAULT_
PAGE_ SIZE - Default page size when a request omits
limit. - DEFAULT_
PORT - EVENTS_
APPEND_ PATH - EVENTS_
SEARCH_ PATH - HEALTH_
PATH - MAX_
PAGE_ SIZE - Upper bound the server enforces on any page size.
- REDACTED
- Placeholder written over any value that looks like a credential.
- SERVICE_
NAME - SERVICE_
TOKEN_ ENV - Optional static service token. When unset, the server runs in open mode.
Functions§
- redact_
payload - Mask credential-shaped fields anywhere in a trace payload.