Overview
Valiqor tracing captures the full execution flow of your AI application — LLM calls, tool executions, retrieval steps, and custom logic — as structured traces with spans. Three levels of instrumentation are available:- Zero-config —
import valiqor.autoand traces are captured automatically - Decorators —
@trace_workflowand@trace_functionfor explicit control - Manual spans — Full control via
TracerV2for complex pipelines
Zero-Config Auto-Instrumentation
The simplest way to start tracing. Add one import at the top of your application:.valiqorrc and automatically patches supported providers (OpenAI, Anthropic, LangChain, Ollama, Agno).
autolog() Function
Enable auto-instrumentation programmatically with more control:
disable_autolog()
Disable auto-instrumentation:
Provider-Specific Shortcuts
configure() Function
Configure the tracing system programmatically:
Decorators
@trace_workflow
Create a trace for a workflow. Works as both a context manager and a decorator.
@trace_function
Create a span under the active trace for a function call.
Conversation Tracking
For multi-turn conversational agents, group multiple interactions into a single trace:TracerV2 — Manual Tracing
For full control over trace and span lifecycle:
Constructor
Trace Lifecycle
Span Lifecycle
Message Logging
RAG-Specific Methods
TracerV2 provides specialized methods for tracing RAG pipelines:
track_retrieval()
Track a retrieval step with document hits.
track_generation()
Track a generation step.
track_rag_pipeline()
Track the entire RAG pipeline in one call.
Constants
ValiqorStage
Pipeline stage labels for spans:
ValiqorSpanKind
Span kind classification:
Exporters
ConsoleExporter
Print trace events to the console. Useful for development.
FileExporter
Write trace events to local JSON files.
APIExporter
Upload trace events to the Valiqor backend.
Related
- Tracing Workflow — Step-by-step tracing guide
- Traces & Spans — Conceptual overview
- TraceQueryClient — Query uploaded traces
- Integrations — Provider-specific auto-instrumentation
- Models Reference —
DocumentHit,RetrievalInfo,Citation,GenerationInfo