Launch Week 3: Five days of launches

Switch from Braintrust to Confident AI

Move your traces from Braintrust to Confident AI with confident-trace. Your OpenTelemetry spans, provider clients and frameworks stay untouched.

Overview

Braintrust logs through a project logger and a wrapped provider client. confident-trace replaces both with one init() call and OpenTelemetry auto instrumentation, so the switch is small: drop the logger and the wrapper, rename the decorator, and keep every span you emit today.

In this guide, you will:

  • Install confident-trace and replace the Braintrust keys with one CONFIDENT_API_KEY.
  • Replace the client setup with init() so auto instrumentation emits the spans.
  • Rename @traced 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.
$200 in migration credits, applied after your callBook a call, show us your current setup, and we map your traces, datasets and prompts together. Applied as a coupon to your first paid invoice, one per organization.Book a migration call

Prerequisites

  • A Project API Key, CONFIDENT_API_KEY (for example confident_us_proj_...). Retrieve yours here.
  • Python 3.10+ for the Python SDK, or Node.js 22+ for the TypeScript SDK.
  • Your existing Braintrust setup. The before snippets below follow the Braintrust quickstart as of September 2026.

Switch

  1. Install confident-trace

    One package. Provider SDKs stay optional peers. CONFIDENT_API_KEY replaces BRAINTRUST_API_KEY. For the EU region, also set CONFIDENT_OTEL_ENDPOINT=https://eu.otel.confident-ai.com/v1/traces.

    pip install confident-trace
    export CONFIDENT_API_KEY=...
    # replaces BRAINTRUST_API_KEY
  2. Replace init_logger and wrap_openai with init()

    Drop the logger and the wrapper. Auto instrumentation emits the spans from the plain client.

    from braintrust import init_logger, wrap_openai
    from openai import OpenAI
    
    logger = init_logger(project="My Project")
    client = wrap_openai(OpenAI())
    
    response = client.chat.completions.create(
        model="gpt-4.1-mini",
        messages=[{"role": "user", "content": "Hello"}],
    )
  3. Rename @traced to @span

    Same shape. Inputs and outputs land on the span.

    from braintrust import traced
    
    @traced
    def answer(question: str) -> str:
        return client.chat.completions.create(
            model="gpt-4.1-mini",
            messages=[{"role": "user", "content": question}],
        ).choices[0].message.content

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.

CapabilityBraintrustConfident AI
OpenTelemetry ingestionYesOTLP over HTTP and gRPC
Auto-instrumented providersOpenAI, Anthropic, Gemini, Mistral, CohereOpenAI, Anthropic, Google GenAI, Bedrock, 5 gateways, 16 frameworks
Built-in eval metricsAutoevals, about 20 scorers50+ research-backed metrics through DeepEval
Online evals on traces, spans and threadsSampled, 1 to 10 percent suggested at volumeEvery trace, no sampling
Quality-aware alerting on eval scoresSlack, webhookEmail, Slack, Discord, Teams
Prompt and use case drift detectionNoYes
Automatic dataset curation from productionManual add to datasetIngestion tasks, filtered and tagged
End-to-end app testing over HTTPNoYes
Multi-turn simulationNoYes
Git-based prompt managementNoBranches, PRs, approvals, eval actions
Cross-functional workflows, no codeLimitedPMs and QA run evals over HTTP
Regression testing and CI gatesYesYes
Safety monitoringNoToxicity, 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 Braintrust logs, datasets and prompts?

The bt CLI pulls logs and experiments to NDJSON files. Datasets query through btql. Bring the export to the migration call and we map it.

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.

Last updated on

Built byConfident AI