Event fields
Identity and timing
Auto-generated UUID primary key for the event.
The timestamp of the API call. Defaults to the time OTAS receives the log request. You can override this to preserve the original call time.
Auto-derived from
event_time. Used to partition and index events efficiently for date-range queries.Context
UUID of the project this event belongs to. Resolved automatically from the SDK key or agent key used to log it.
UUID of the agent that made the call. Optional when logging via the Backend SDK without a specific agent context.
UUID of the session this event belongs to. Provide this to group all calls from one agent task or run together.
Request
The URL path of the API call, e.g.,
/v1/messages or https://api.openai.com/v1/chat/completions.HTTP method:
GET, POST, PUT, PATCH, DELETE, etc.HTTP status code returned by the upstream API, e.g.,
200, 429, 500.Serialized request headers. Omit or redact authorization headers before logging.
Raw request body as a string.
URL query parameters as a serialized string.
Form-encoded POST data, when applicable.
Value of the request
Content-Type header, e.g., application/json.Size of the request body in bytes. Defaults to
0.Response
Serialized response headers.
Raw response body as a string.
Value of the response
Content-Type header.Size of the response body in bytes. Defaults to
0.Performance and diagnostics
End-to-end latency in milliseconds from when your agent sent the request to when it received the response.
A non-null value marks this event as an error. Set this to any error message, exception type, or structured string when the call fails or your agent raises an exception.
Arbitrary JSON for any structured context you want to attach to the event that doesn’t fit another field.
Additional key-value pairs for filtering and grouping events in the dashboard, e.g.,
{ "model": "claude-3-5-sonnet", "temperature": 0.7 }.Required vs. optional fields
Required when logging an event:project_idpathmethodstatus_codelatency_ms
agent_id, agent_session_id, request_body, response_body, and error gives you the most complete observability picture.
Two sources of events
- Backend SDK
- Agent direct logging
Server-side middleware authenticates with
X-OTAS-SDK-KEY and logs events on behalf of agents. The project is resolved from the key. Use this approach when you have a proxy or middleware layer that intercepts all outbound API calls from your service.Error detection
OTAS treats an event as an error when theerror field is non-null and non-empty. You control what counts as an error: set this field to the exception message, an error code, or any descriptive string when a call fails or your agent catches an exception.