Structured logs record service events in a common, queryable format. In AI systems, events can include model names, token counts, costs, fallback chains, guardrail results, and retrieval scores alongside standard correlation IDs. section 7.4.1
Trace and span IDs connect events across services, letting operators retrieve the logs for a request and investigate slow or problematic spans. Attribute filters support targeted queries; cursor-based pagination handles large result sets. Use pseudonymized user IDs where required, and set retention policies because log storage grows continuously. section 7.4.1
Listing 7.2 Structured log event Protocol Buffer definition
message LogEvent {
string event_id = 1;
string trace_id = 2; #A
string span_id = 3; #A
google.protobuf.Timestamp timestamp = 4;
string service = 5;
Severity severity = 6;
string event_type = 7; #B
string message = 8;
map<string, string> attributes = 9; #C
map<string, double> numeric_attributes = 10; #C
string workflow_id = 11;
string user_id = 12;
}The event schema includes identifiers, timestamp, service, severity, event type, message, flexible attributes, and workflow and user IDs. section 7.4.1
Recording a provider fallback
A fallback event can record warning severity, the original and fallback providers, the error type, and the request’s trace and span IDs. section 7.4.1
Platform services can emit structured telemetry automatically, while an observability client batches and buffers delivery so publishing does not slow user requests. section 7.5




















