Tracing
Tracing gives your LLM applications OpenTelemetry-based observability: it captures traces of LLM calls, tool invocations, and retrieval operations through a semantic layer built for AI workloads. It runs in two modes — test mode (linked to test runs) and production mode (live monitoring) — supports auto-instrumentation for LangChain, LangGraph, Microsoft Agent Framework, and Pydantic AI, and provides convenience decorators for common AI operations.
Core Concepts
What is a Trace?
A trace represents the complete journey of a single request through your application. It captures everything that happens from when a user sends a message to when they receive a response.
What is a Span?
A span represents a single operation within a trace. Each function call, LLM invocation, or tool execution creates a span with:
- Name - What operation occurred (e.g.,
ai.llm.invoke,function.chat) - Duration - How long it took
- Attributes - Metadata like model name, token counts, or tool parameters
- Status - Success or error
Trace Hierarchy
Spans are organized in a parent-child hierarchy. The root span represents the entry point, with child spans for each nested operation:
In this example:
- The trace captures a complete chat interaction
- The root span (
function.chat) is the entry point - Child spans show each nested operation with timing
Traces Dashboard
View all traces from your application in the Rhesis dashboard. Each row shows the operation name, linked endpoint, duration, span count, status, and environment.
The dashboard shows traces for the active project. If the list looks empty or stale, use the organization menu to switch projects and reload the trace list under the correct project scope.
Conversation Traces
For multi-turn tests and chat sessions, traces group into conversation threads with turn-by-turn navigation across the tree, sequence, and graph views. See Conversation Tracing for the full walkthrough.
Quick Start
Endpoints Are Automatically Traced
Use @endpoint for functions you want Rhesis to call from the product (for example when a test run executes your code via the Connector), not only for tracing. Those functions are automatically traced when they run. Use @observe for code you only need to observe inside your app; it is not registered for remote invocation. See Observe vs endpoint for the full comparison.
How It Works
Traces are sent via HTTP (not WebSocket), batched and exported every 5 seconds.
Operating Modes
Test Mode
Traces originate from test runs triggered through the platform or SDK. Linked data is preserved:
- The endpoint being tested
- The test run that initiated the trace
- The specific test case being executed
Click any trace to view its span hierarchy, timing breakdown, and linked test results:
Production Mode
Traces originate from normal application operation. They capture live behavior for monitoring and performance analysis.
Next steps
- Getting Started - Configure tracing in your application
- Decorators -
@observeand@endpoint - Trace Metrics - Automatic evaluation on live traces
- Connector - Register functions as testable endpoints