Switch from LangSmith to Confident AI
Move your traces from LangSmith to Confident AI with confident-trace. Your LangChain and LangGraph spans, provider clients and frameworks stay untouched.
Overview
LangSmith wraps your provider client and decorates your functions. confident-trace does the same work through OpenTelemetry auto instrumentation, so the switch is small: replace wrap_openai with init(), rename the decorator, and keep the LangChain and LangGraph spans you emit today.
In this guide, you will:
- Install confident-trace and replace the LangSmith keys with one
CONFIDENT_API_KEY. - Replace the client setup with
init()so auto instrumentation emits the spans. - Rename @traceable to @span so every trace carries a name, an input and an output.
- See what changes once the traces land in Confident AI: evals on every trace, datasets curated from production, alerts when quality drops.
Prerequisites
- A Project API Key,
CONFIDENT_API_KEY(for exampleconfident_us_proj_...). Retrieve yours here. - Python 3.10+ for the Python SDK, or Node.js 22+ for the TypeScript SDK.
- Your existing LangSmith setup. The before snippets below follow the LangSmith quickstart as of September 2026.
Switch
Install confident-trace
One package. Provider SDKs stay optional peers.
CONFIDENT_API_KEYreplaces LANGSMITH_TRACING, LANGSMITH_API_KEY, LANGSMITH_PROJECT. For the EU region, also setCONFIDENT_OTEL_ENDPOINT=https://eu.otel.confident-ai.com/v1/traces.pip install confident-trace export CONFIDENT_API_KEY=... # replaces LANGSMITH_TRACING, LANGSMITH_API_KEY, LANGSMITH_PROJECTnpm install confident-trace export CONFIDENT_API_KEY=... # replaces LANGSMITH_TRACING, LANGSMITH_API_KEY, LANGSMITH_PROJECT node --import confident-trace/register dist/index.jsReplace wrap_openai with init()
Drop the wrapper. Auto instrumentation emits the spans from the plain client. LangChain and LangGraph spans export as they are.
from langsmith.wrappers import wrap_openai from openai import OpenAI client = wrap_openai(OpenAI()) response = client.chat.completions.create( model="gpt-4.1-mini", messages=[{"role": "user", "content": "Hello"}], )from confident_trace import init from openai import OpenAI init() client = OpenAI() response = client.chat.completions.create( model="gpt-4.1-mini", messages=[{"role": "user", "content": "Hello"}], )import { wrapOpenAI } from "langsmith/wrappers"; import OpenAI from "openai"; const client = wrapOpenAI(new OpenAI()); const response = await client.chat.completions.create({ model: "gpt-4.1-mini", messages: [{ role: "user", content: "Hello" }], });import { init } from "confident-trace"; import OpenAI from "openai"; const tracing = init(); const client = new OpenAI(); const response = await client.chat.completions.create({ model: "gpt-4.1-mini", messages: [{ role: "user", content: "Hello" }], });Rename @traceable to @span
Same shape. The run type becomes the span type.
from langsmith import traceable @traceable(run_type="tool") def get_context(question: str) -> str: return search(question)from confident_trace import span @span(type="tool") def get_context(question: str) -> str: return search(question)import { traceable } from "langsmith/traceable"; const getContext = traceable( async (question: string) => search(question), { run_type: "tool" }, );import { span } from "confident-trace"; const getContext = span( { name: "getContext", type: "tool" }, async (question: string) => search(question), );
Run your app once. The trace appears in your project's Observatory within seconds. If it does not, check that CONFIDENT_API_KEY is set in the same process and that the app flushes before it exits.
What Changes
Tracing is where you start. Evals are where it pays off. Every trace gets a score. Low scores become dataset rows. Dataset rows become regression tests. Your next release ships against real production failures.
| Capability | LangSmith | Confident AI |
|---|---|---|
| OpenTelemetry ingestion | Yes | OTLP over HTTP and gRPC |
| Auto-instrumented providers | OpenAI and Anthropic wrappers, LangChain by env var | OpenAI, Anthropic, Google GenAI, Bedrock, 5 gateways, 16 frameworks |
| Built-in eval metrics | Prebuilt templates, custom evaluators | 50+ research-backed metrics through DeepEval |
| Online evals on traces, spans and threads | Yes | Yes |
| Quality-aware alerting on eval scores | Slack, PagerDuty, Dynatrace, webhook | Email, Slack, Discord, Teams |
| Prompt and use case drift detection | Limited | Yes |
| Automatic dataset curation from production | Manual plus automation rules | Ingestion tasks, filtered and tagged |
| Multi-turn simulation | No | Yes |
| Git-based prompt management | No | Branches, PRs, approvals, eval actions |
| Cross-functional workflows, no code | No | PMs and QA run evals over HTTP |
| Framework-agnostic depth | Deepest on LangChain | Yes |
| Regression testing and CI gates | No | Yes |
| Safety monitoring | No | Toxicity, bias, PII on production traffic |
Migration Questions
Do I have to rewrite my instrumentation?
No. confident-trace exports through standard OTLP. Existing OpenTelemetry spans from your frameworks are exported as they are.
Can I run both during the switch?
Yes. Point an OpenTelemetry Collector at both endpoints and compare for a week before you cut over. CONFIDENT_OTEL_ENDPOINT accepts a Collector URL.
What about my LangSmith datasets and prompts?
Datasets export as CSV or through the API. Prompts pull one by one with pull_prompt. Bring them to the migration call and we map them.
How do I get the $200?
Book the call. After it, we apply a $200 coupon to your organization's first paid invoice. One reward per organization.
Is the TypeScript SDK ready?
The Python SDK is stable on PyPI. The TypeScript SDK is an alpha release on npm. The TypeScript snippets in this guide follow the alpha API.
Related
OpenTelemetry integration
Send OTLP traces from any SDK or Collector to Confident AI, with the attribute keys the platform reads.
Build test runs from traces
Turn your production traces into an evaluated test run before you ship.
LLM Observability
Evals on every trace, drift detection, alerts, and datasets curated from production.
confident-trace on GitHub
The OpenTelemetry-native tracing SDK with 25 integrations for Python and TypeScript.
Last updated on