LogEvent
Structured log event emitted by observe.log() middleware. Consumable by Datadog, Grafana, ELK, etc.
Properties
Section titled “Properties”agentName?
Section titled “agentName?”
optionalagentName?:string
Agent name for multi-agent filtering. Added in 009-providers-observability.
data:
Record<string,unknown>
Event-specific data (model, tokens, cost, tool name, duration, error).
durationMs?
Section titled “durationMs?”
optionaldurationMs?:number
Duration in milliseconds (present on end events).
error?
Section titled “error?”
optionalerror?:object
Error details (present on failure events).
message
Section titled “message”message:
string
type:
string
level?
Section titled “level?”
optionallevel?:"debug"|"info"|"warn"|"error"
Log severity level. Added in 009-providers-observability.
sessionId
Section titled “sessionId”sessionId:
string
Session identifier.
spanId?
Section titled “spanId?”
optionalspanId?:string
OpenTelemetry span ID (present when OTel span context is active).
timestamp
Section titled “timestamp”timestamp:
string
ISO 8601 timestamp.
traceId?
Section titled “traceId?”
optionaltraceId?:string
OpenTelemetry trace ID (present when OTel span context is active).
turnId?
Section titled “turnId?”
optionalturnId?:string
Turn identifier (present on turn/model/tool events).
turnIndex
Section titled “turnIndex”turnIndex:
number
Turn number within this session.
type:
string
Event type: “model:call”, “model:response”, “tool:start”, “tool:end”, etc.