Skip to main content

Crate agent_trace_contract

Crate agent_trace_contract 

Source
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:

ConversationTrace
Replayed into a model promptyesnever
Losing one recordloses user workacceptable
Volumeone per turnmany per turn
Retentiondurableshort

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 + bin

See api.md for the full HTTP reference.

Structs§

ApiError
Error body shared by every non-2xx response.
AppendEventsRequest
AppendResponse
Result of an append. skipped counts ids that already existed, so a caller can tell a fresh write from a deduplicated retry.
EventsResponse
Events in chronological order, oldest first.
RuntimeEventRecord
One runtime trace event.
SearchEventsRequest
TraceScope
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.