Skip to main content
Tracing captures every LLM call, tool invocation, and retrieval step in your AI application as structured traces and spans — which you can then analyze with Failure Analysis, Evaluations, or Security Audits.

Zero-config auto-instrumentation

The fastest way to start tracing — one import, no code changes:
On import, valiqor.auto:
  1. Loads config from env vars / .valiqorrc
  2. Calls enable_autolog() for all supported providers
  3. Starts capturing LLM calls to traces
Set VALIQOR_QUIET=true to suppress the startup message in production.

Configuration via environment


Selective auto-instrumentation

Enable tracing for specific providers only:

Per-provider functions


Trace workflows and functions

For structured tracing beyond auto-instrumentation, use trace_workflow and trace_function:

trace_workflow — creates a new trace

Use as a context manager or decorator. Creates a top-level trace that groups all nested operations:

trace_function — creates a span

Creates a span under the currently active trace (does not create a new trace):

Combined example


Conversation tracking

For multi-turn chat applications:

Exporters

Control where traces are sent:
By default, valiqor.auto configures both FileExporter and CloudExporter (if an API key is set).

Span kinds

Every span is classified with a ValiqorSpanKind:

RAG stage types

For RAG applications, spans can be annotated with a ValiqorStage:

CLI workflow

For codebases where you prefer CLI-based instrumentation:

Querying traces

Read back traces from the backend using the trace query client:

From trace to analysis

Once you have traces, run any analysis on them:

Traces & Spans →

Deep dive into trace structure, span kinds, and metadata.

Failure Analysis →

Run failure analysis on captured traces.