Skip to main content
Per-session trace attributes, merged over the client’s tracing defaults.

Properties

number
Longest string recorded for inputs/outputs. Defaults to 16000 characters.
Record<string, string | number | boolean>
Merged over the client’s metadata.
string
Trace name for turns that start a trace.
Context
Parent for turn spans. Defaults to the context active when the session is traced (traceSession(), or the session opening under traceSessions()); with no active span, each turn is its own trace.
boolean
Record prompt, response and tool input/output text. Defaults to true; false keeps timing, usage, cost, model and tool names only.
string
Groups the session’s turns; defaults to the ACP session id.
string[]
Added to the client’s tags.
Tracer
Defaults to trace.getTracer("@cognition-ai/sdk") on the global tracer provider.
number
US dollars per ACU. When set, generations with a known ACU cost report cost_details in dollars; ACUs are always recorded as metadata.
string
User the session’s turns are attributed to.