Skip to content

LogEvent

Structured log event emitted by observe.log() middleware. Consumable by Datadog, Grafana, ELK, etc.

data: Record<string, unknown>

Event-specific data (model, tokens, cost, tool name, duration, error).


sessionId: string

Session identifier.


timestamp: string

ISO 8601 timestamp.


turnIndex: number

Turn number within this session.


type: string

Event type: “model:call”, “model:response”, “tool:call”, “tool:result”, “retry”, “error”, etc.