Monitor and debug your agents with built-in observability tools. Use collected logs, traces, session timelines, and web analytics to see what your app did and where it failed.
Logging
Collected logs with searchable context
Tracing
Distributed tracing with OpenTelemetry
Sessions & Debugging
Debug sessions and inspect state
Web Analytics
Frontend page views and browser events
Quick Reference
Logging
ctx.logger.child({ userId, action }).info('Processing request');
ctx.logger.child({ error: 'OpenAI request timed out' }).error('Failed to process');Tracing
await ctx.tracer.startActiveSpan('fetch-data', async (span) => {
try {
span.setAttribute('source', 'api');
return await fetchData();
} finally {
span.end();
}
});Sessions
// Access session ID for debugging
ctx.logger.child({ sessionId: ctx.sessionId }).info('Session started');Access Patterns
| Context | Logger | Tracer |
|---|---|---|
| Agents | ctx.logger | ctx.tracer |
| Routes | c.var.logger | c.var.tracer |
Agent session IDs are derived from trace IDs with a sess_ prefix, so session logs and timelines line up in the Agentuity Console.