Skip to main content
Tracing helps you understand the flow of operations in your LLM application.

Creating Traces

With Callback

With Options

Creating Spans

Spans represent individual operations within a trace.

Nested Spans

Manual Trace Management

For more control, use manual trace management:

Adding Metadata

Error Handling

Errors are automatically captured:
Add custom error context:

Parallel Operations

Traces handle parallel operations correctly:

Express Middleware

For Express apps, use the middleware: