Skip to main content
Valiqor provides the deepest integration with LangChain, automatically tracing chat models, chains, tools, retrievers, and LangGraph nodes. RAG pipelines get dedicated retrieval spans with document scores and relevance data.

Install

This installs valiqor plus langchain>=0.1.0 and langchain-core>=0.1.0.
Add a single import at the top of your app — all LangChain components are automatically traced:
Every LLM call, chain invocation, tool execution, and retrieval is traced.

Selective Instrumentation

If you only want LangChain tracing:

What Gets Instrumented

LangChain instrumentation covers 5 subsystems:

Chat Models

invoke(), ainvoke(), stream(), astream() on any BaseChatModel subclass — captures model name, vendor, tokens, cost, and messages.

Chains

invoke() and ainvoke() on Runnable chains — captures the full LCEL pipeline execution.

Tools

invoke(), ainvoke(), run(), arun() on BaseTool — captures tool name, arguments, and results.

Retrievers

get_relevant_documents() and aget_relevant_documents() on BaseRetriever — captures documents, scores, and retrieval metadata.

LangGraph

LangGraph is also instrumented automatically:
  • Graph execution: invoke() and ainvoke() on compiled graphs
  • Node execution: Individual node functions are wrapped and traced
  • State tracking: Graph state transitions are captured

RAG Pipeline Tracing

When using retrievers, Valiqor captures rich RAG-specific data automatically:
Each retrieval span captures:

Async Support

All LangChain async methods are traced automatically:

Streaming

LangChain streaming is supported — stream() and astream() calls are traced:

Custom Retriever Detection

If you have custom retrieval tools that Valiqor doesn’t detect automatically, you can register them:

What Gets Captured

Chat Model Spans

Tool Spans


With Workflows

Group LangChain operations into a named trace:

Disabling


Next Steps

Tracing Guide

Learn about traces, spans, workflows, and exporters.

Traces & Spans

Understand the trace data model, span kinds, and RAG stages.