Skip to main content

4 posts tagged with "AI agent tracing"

View All Tags

Braintrust vs LangSmith vs Langfuse (and MLflow) for Agent Observability

· 13 min read

For agent observability, pick Langfuse if you want a tracing-first product with an MIT-licensed core, LangSmith if you build on LangChain or LangGraph and want a managed service, Braintrust if you want a hosted evaluation workflow, and MLflow if you want Apache-2.0 tracing and evaluation in one server you run yourself. The right answer depends on three things: who hosts your trace data, how the license reads, and how the bill scales.

This page compares the four on those three points, using each vendor's own pricing page, documentation, and repository, all checked on 2026-11-05.

Disclosure: this page was written by MLflow maintainers, and MLflow is one of the four tools. This page covers the open-source project only. We kept the criteria the same for every tool and say where MLflow falls short.

TL;DR​

Short version for each tool:

  • Langfuse: the only one of the three dedicated products with a stated open-source license for its platform, in our reading. The repository is MIT licensed, except the ee folders.
  • LangSmith: the lowest-friction path if your agents already use LangChain or LangGraph. Self-hosting is an Enterprise add-on.
  • Braintrust: priced on processed data and scores, with 14 or 30 days of retention on the self-serve plans. Hybrid self-hosting is closed to new customers from 2026-11-04, so verify the current options with Braintrust.
  • MLflow: Apache-2.0, hosted by the Linux Foundation, and the one that also covers experiment tracking and a model registry. Its tradeoff is breadth: it is a larger project than a tracing-only tool.
  • All four accept or emit OpenTelemetry traces in some form. The details differ, and the table below spells them out.

What does agent observability need from a tool?​

An agent run is a tree: model calls, tool calls, retrieval steps, and sub-agents, often across several turns. Agent observability means capturing that tree as a trace, grouping traces into sessions, attaching cost and quality scores, and letting you search the result.

We compared the tools on six criteria:

  1. License and governance. Can you read, run, and fork the code, and who controls it?
  2. Where the data lives. Can traces stay in your own infrastructure?
  3. OpenTelemetry. Can you send standard OTLP traces without a vendor SDK?
  4. Pricing model. What do you pay for as agent traffic grows?
  5. Retention. How long can you look back on each tier?
  6. Evaluation. Can you score the traces you collected?

We left out raw speed and UI polish. Neither has a number any of the four vendors publishes, and a screenshot is not a benchmark.

How do Braintrust, LangSmith, Langfuse, and MLflow compare?​

BraintrustLangSmithLangfuseMLflow
LicensePlatform: hosted, no open-source license stated in its docs. SDKs: Apache-2.0SDKs are MIT; platform license not stated in its docsMIT, except ee foldersApache-2.0
Self-hosting"Legacy" data plane you host; closed to new customers from 2026-11-04. BYOC is documentedEnterprise add-on, runs on your Kubernetes clusterDocker Compose (local and testing), Helm and Terraform for productionmlflow server plus a SQL backend store and artifact storage (SQLite and local files work for a trial)
OpenTelemetryOTLP ingest endpointOTLP ingest endpointBuilt on OpenTelemetry, OTLP endpointOTLP ingest endpoint on the tracking server (3.6.0 and later)
Free tierStarter: $0, 1 GB processed data, 14 daysDeveloper: $0, 1 seat, 5k base traces, 14 daysHobby: $0, 50k units, 30 days, 2 usersFree to self-host, no seat limit
First paid tierPro: $249/month, 30 daysPlus: $39 per seat/month, 10k base traces, 14 daysCore: $29/month, 100k units, 90 daysNot applicable
What the bill scales withProcessed GB and scoresSeats and tracesUnitsYour own infrastructure

Prices are list prices on each vendor's pricing page on 2026-11-05. Higher tiers exist, such as Langfuse Pro at $199 a month, and prices change, so check the linked page before you decide. Units, base traces, and processed GB are different measures, so price your own volume on each.

1. Langfuse: best for a tracing-first product you can self-host​

Langfuse is an LLM observability platform whose repository is "MIT licensed, except for the ee folders." The ee code falls under a separate license in ee/LICENSE, and its self-hosting docs say some add-on features need a license key.

Evidence: Langfuse says it is built on OpenTelemetry and that any OpenTelemetry-instrumented app, framework, or collector can send it traces. You can deploy it with Docker Compose on one machine, or with Helm and Terraform templates for AWS, Azure, and GCP (repository). The self-hosted architecture depends on PostgreSQL, ClickHouse, Redis or Valkey, and S3-compatible blob storage (self-hosting docs).

Pricing: Langfuse Cloud charges per unit. Hobby is free with 50k units and 30 days of data access. Core is $29/month with 100k units and 90 days. Pro is $199/month with 3 years of access. Overage is $8 per 100k units, with lower rates at volume.

Where it falls short: A self-hosted Langfuse needs PostgreSQL, ClickHouse, Redis or Valkey, and blob storage, which is more to operate than a SQL database and an artifact store. The ee features are not MIT, so check which ones you need before you assume the whole product is permissive.

Best for: teams that want a dedicated tracing product, a permissive core license, and the option to run it themselves.

2. LangSmith: best for LangChain and LangGraph teams that want a managed service​

LangSmith is LangChain's observability and evaluation platform. It works outside LangChain too: its OpenTelemetry guide says LangSmith "receives spans at its OTLP endpoint," and documents tracing non-LangChain agents with a standard OpenTelemetry client.

Evidence: The LangSmith pricing page lists Developer at $0 per seat with 5k base traces a month, Plus at $39 per seat with 10k base traces, and Enterprise at custom pricing. Base trace retention is 14 days on Developer and Plus, and extended 180-day retention is an upgrade at an extra fee. Seats are part of the bill, so cost grows with team size as well as trace volume.

Self-hosting: The pricing page lists self-hosting only under Enterprise. The self-hosted docs describe it as an Enterprise add-on that runs in your own Kubernetes cluster, backed by ClickHouse, PostgreSQL, and Redis or Valkey. The Python and JavaScript SDK repositories are MIT licensed, but we found no open-source license for the platform itself in LangSmith's docs.

Where it falls short: If data residency or a permissive license is a hard requirement, the path runs through an Enterprise contract. Per-seat pricing also adds up for wide teams where many people only need to read traces.

Best for: teams already on LangChain or LangGraph who want a managed service and are fine paying per seat.

3. Braintrust: best for a hosted workflow built around scores​

Braintrust is a hosted platform for tracing and evaluating LLM apps. Its JavaScript and Python SDKs are Apache-2.0, but we found no open-source license for the platform in its docs.

Its pricing page shows how it meters usage: processed data in GB and scores, not seats. Starter is $0 with 1 GB of processed data, 10k scores, and 14 days of retention. Pro is $249/month with 5 GB, 50K scores, and 30 days, and retention extends at $0.50 per GB per month.

OpenTelemetry: Braintrust's OpenTelemetry docs describe an OTLP traces endpoint at https://api.braintrust.dev/otel/v1/traces. They describe sending data into Braintrust, not exporting it to another OpenTelemetry backend.

Self-hosting: Braintrust's self-hosting guide describes a hybrid model. You run the data plane, which stores traces, spans, and datasets, and Braintrust runs the control plane with the UI and authentication. The guide also says that "starting November 4, 2026, it isn't available to new customers," and points to Bring your own cloud (BYOC) for data residency.

Where it falls short: Hybrid self-hosting is now closed to new customers, and the docs point to BYOC instead, so ask Braintrust whether that fits your data rules. A 14 or 30 day window on the self-serve plans is short if you debug regressions that surface weeks later.

Best for: teams that want a hosted product with scoring at the center, including unlimited human review scores on Pro, and are comfortable with a vendor-managed control plane. For a longer one-to-one view, see our Braintrust alternative page.

4. MLflow: best for tracing and evaluation in one Apache-2.0 server​

MLflow is an Apache-2.0 open-source platform for agents, LLMs, and ML models, hosted by the Linux Foundation. MLflow Tracing captures LLM and agent calls as traces, and its tracing docs say it is "fully compatible with OpenTelemetry and natively supports GenAI Semantic Conventions for export and ingestion." The open-source tracking server accepts OTLP traces, which needs a SQL backend store and an experiment ID header (ingest docs).

Evidence: A running server plus a few lines of code traces an OpenAI app:

import mlflow

mlflow.set_tracking_uri("http://localhost:5000") # server started with `mlflow server --port 5000`
mlflow.set_experiment("agent-observability")
mlflow.openai.autolog()

The same server groups traces into sessions, records token usage and cost, and runs LLM-judge evaluation on traces you already collected. The tracing docs describe OpenTelemetry compatibility for both export and ingestion, and Full OpenTelemetry Support in MLflow Tracing covers the ingest side.

Where it falls short: MLflow is a broader project than a tracing-only tool, so GenAI-only products can move faster on a narrow feature. Self-hosting means you own upgrades, storage, and access control, and fine-grained permissions for shared resources only arrived in 3.17.0 (2026-10-07). Hosted MLflow services exist, but this entry describes the open-source project only.

Best for: teams that want one self-hosted Apache-2.0 server for traces, evaluation, and the model lifecycle. For one-to-one comparisons, see MLflow vs Langfuse and MLflow vs LangSmith.

Which tool fits which team?​

Three scenarios show how the criteria play out.

  • A five-person startup shipping a LangGraph agent. LangSmith's Developer tier is free for one seat, but Plus is $39 per seat, so a five-person team pays $195 a month before trace overage. Langfuse Core is $29 a month with unlimited users, 100k included units, and 90 days of data access. Units and traces are different measures, and Langfuse overage is $8 per 100k units, so price your own volume on both. If the agent isn't tied to LangChain, Langfuse Core's cost does not grow with team size, only with units past the included 100k.
  • A platform team at a regulated company. Traces contain customer prompts, so they must stay in your network. Braintrust points new customers to Bring your own cloud (BYOC), and LangSmith self-hosting is available on Enterprise. Neither platform has a stated open-source license, though their SDKs are open source. MLflow (Apache-2.0) and Langfuse (MIT core) are the open-source options you can start with today. Each needs a database and storage you operate.
  • An ML team that already tracks experiments. If your models already log to MLflow, agent traces land beside the runs and models they relate to, and LLM-judge evaluation uses the same server. A tracing-only product means a second system to run and a second place to look.

The $195 figure is five seats at LangSmith's listed $39 per seat, with no overage. Your own number depends on trace volume.

Which one should you pick?​

Start from the constraint you cannot change.

  • Traces must stay in your network, and the license must be open source: MLflow or Langfuse. Choose MLflow if you also want evaluation and a model registry in the same server. Choose Langfuse if you want a tracing-first product and can run PostgreSQL, ClickHouse, Redis, and blob storage.
  • Your agents run on LangChain or LangGraph, and you want a managed service: LangSmith. Budget for seats.
  • You want hosted evaluation with scores as the main unit: Braintrust. Check retention against how far back you debug.
  • You already run an OpenTelemetry collector: all four can take OTLP traces, so lean on whichever backend your team will actually operate.

If you are choosing today, run the same agent through two of them for a week. Trace volume and retention needs show up in a real bill faster than a feature list does.

FAQ​

Is Langfuse really open source?​

The Langfuse repository is MIT licensed except for its ee folders, which fall under a separate license in ee/LICENSE. The core tracing product is MIT. Enterprise add-ons in the ee folders are not.

Can LangSmith be self-hosted?​

Yes, on the Enterprise plan. LangSmith's docs describe self-hosting as an Enterprise add-on that runs in your own Kubernetes cluster. The Developer and Plus plans do not include it.

Can I still self-host Braintrust?​

Not if you are a new customer. Braintrust's docs say hybrid self-hosting is not available to new customers starting 2026-11-04, and they point to Bring your own cloud (BYOC) for data residency.

Which of these works with OpenTelemetry?​

All four accept or emit OpenTelemetry traces. Braintrust, LangSmith, and Langfuse document OTLP ingest endpoints, and MLflow is compatible with OpenTelemetry and its GenAI semantic conventions. Check each docs page for the exact endpoint and headers.

Which is best for agent observability?​

There is no single best. For an open-source license and self-hosting, look at MLflow or Langfuse. For a managed LangChain workflow, look at LangSmith. For hosted score-driven evaluation, look at Braintrust.

Next step​

If you want to try MLflow, start the server with mlflow server --port 5000, add mlflow.openai.autolog() to your agent, and compare the trace view with the tool you use today. Our LLM tracing guide walks through the setup, and best LLM tracing tools for multi-agent systems covers the multi-agent case.

AI Agent Evaluation vs Observability: What's the Difference?

· 18 min read

AI agent observability records what an agent did: every model call, tool call, and intermediate step, with latency, token counts, and errors. AI agent evaluation scores whether what it did was good, using code checks, LLM judges, or human review. Observability gives you the evidence. Evaluation gives you the verdict. You need both, and the traces you collect for the first are the raw material for the second.

The failure this guide is about is a quiet one: the dashboard stays green, every status code is 200, and the agent still gives a wrong answer. Observability alone cannot catch that, and the two words are often used as if they meant the same thing, so we wrote down where the line sits. It is for engineers who run an agent in production, or are about to.

Disclosure: this guide was written by MLflow maintainers. The examples use MLflow Tracing and mlflow.genai.evaluate, and the concepts hold in any tool.

TL;DR​

Six points to take away.

  • Observability answers "what happened?" It captures traces of each run: inputs, outputs, tool calls, latency, cost, and errors.
  • Evaluation answers "was it good?" It applies graders (scorers) to an agent's output and its trajectory, and returns scores you can compare across versions.
  • They share one data model. A trace is the input to both a dashboard and a scorer, so tracing is the first step for either.
  • Observability is reactive; offline evaluation is proactive. Anthropic's engineering team says production monitoring detects problems after users hit them, while automated evals run before launch and on every commit.
  • Online evaluation is the bridge. It scores a sample of live traces with the same judges you use in CI, so production monitoring reports quality, not only errors.
  • A healthy agent can still be wrong. Zero errors and fast responses say nothing about whether the answer was correct.

Table of Contents​

What is AI agent observability?​

AI agent observability is the practice of recording enough about every agent run that you can reconstruct and inspect it afterwards. For an agent, that means a trace: a structured record of the request, each model call, each tool call with its arguments and result, and the final response.

MLflow's tracing documentation describes the same idea: tracing captures "the inputs, outputs, and metadata associated with each intermediate step of a request," and it records latency and token usage at each step. The same page describes MLflow Tracing as fully OpenTelemetry-compatible, which matters if your traces need to flow into tools you already run.

Observability is built for questions like these:

  • Why did this request take 40 seconds?
  • Which tool call failed, and with what arguments?
  • How many tokens did this user session cost?
  • Which step did the agent take just before it looped?

Notice what these questions have in common. Each one is about the run, not about whether the result was right. A trace can show that an agent called issue_refund with a valid order ID and got a 200 back. It cannot tell you that the customer was not eligible for a refund.

Quick answer: Agent observability tells you what an agent did on a given run: the steps, tool calls, latency, cost, and errors. It does not, by itself, tell you whether the outcome was correct.

What is AI agent evaluation?​

AI agent evaluation is the practice of measuring whether an agent does its job well, using repeatable tests that return scores. Anthropic's engineering team defines an eval as "a test for an AI system: give an AI an input, then apply grading logic to its output to measure success" in its post Demystifying evals for AI agents (January 9, 2026).

Three terms from that post are worth borrowing:

  • Grader: "logic that scores some aspect of the agent's performance." A single task can have several graders.
  • Transcript (also called a trace or trajectory): "the complete record of a trial, including outputs, tool calls, reasoning," and intermediate results.
  • Outcome: the final state of the environment. A booking agent's outcome is whether the reservation exists in the database, not whether the agent says it does.

The same post says agent evaluations typically combine three grader types: code-based, model-based, and human. Code-based graders are fast, cheap, and objective but brittle. Model-based graders handle nuance but are non-deterministic and need calibration against human judgment. Human graders are the most reliable, but they are expensive and slow, so they are mostly used to calibrate the model-based ones.

Evaluation is built for questions like these:

  • Did the new prompt make answers more correct than the old one?
  • Does the agent pick the right tool for this request?
  • Did the change we shipped on Tuesday cause a regression?
  • Is this LLM judge's score trustworthy?

Quick answer: Agent evaluation applies graders to an agent's outputs and trajectories to produce scores. It tells you whether a run, or a version of the agent, is good enough, and lets you compare versions.

How do evaluation and observability differ?​

The cleanest split is by the question each one answers and the moment it answers it.

DimensionObservabilityEvaluation
Core questionWhat happened on this run?Was the result good, and is this version better?
Main artifactTraces, spans, metrics, logsScores, pass rates, regression reports
Who judgesA person reading a trace, or alert rules on metricsScorers: code checks, LLM judges, human labels
When it runsContinuously on live trafficOffline on a dataset (CI, before release) and online on samples
Typical failure foundErrors, timeouts, loops, cost spikesWrong answers, wrong tools, policy violations, regressions
Needs ground truth?NoSometimes (expected answers); judges can run without it
Output is aRecord you inspectNumber you compare

Quick answer: Observability is a record of behavior that you inspect. Evaluation is a measurement of quality that you compare. Observability answers "what happened?" and evaluation answers "was it good?"

A second difference is timing. Anthropic's post makes the point directly: production monitoring tracks "metrics and errors in live systems," and it is reactive, because problems reach users before you detect them. Evals run without real users and can run on every commit. In the post's words, automated evals are "especially useful pre-launch and in CI/CD," while monitoring "kicks in post-launch to detect distribution drift and unanticipated real-world failures." It concludes that the most effective teams combine the two.

The third difference is what a failure looks like. Observability surfaces loud failures: exceptions, timeouts, a tool returning an error. Agents also fail quietly. They answer fluently and wrongly, call a tool that was allowed but not appropriate, or skip a required step. A dashboard of green status codes will not show any of that. Scorers will, because they read the content and the trajectory rather than the status.

Where do the two overlap?​

The overlap is a single idea: the trace. Once an agent emits traces, three things become possible that were not possible before.

Scorers can read the trace. MLflow's documentation on evaluating traces says "Scorers have access to the complete MLflow traces, including spans, attributes, and outputs." That lets you grade the path as well as the answer, for example the tool call trajectory, sub-agent routing, or retrieved document recall.

Production traces become test cases. Langfuse's documentation describes evaluation as running both offline, "before you ship a change," and online, on live production traces. The point is not which tool you use. The point is that a failure you see in a production trace should end up as a case in your offline suite.

Evaluation scores become observability data. When a judge scores a sampled share of live traffic, quality becomes a time series next to latency and cost. You can alert on "correctness dropped from 0.91 to 0.78" the same way you alert on a latency spike.

                 ┌──────────────────────────────┐
│ Agent in production │
└──────────────┬───────────────┘
│ emits
▼
┌─────────────────┐
│ Traces │ ← observability
└───┬─────────┬───┘
inspect, alert │ │ sample + score
▼ ▼
┌──────────────┐ ┌──────────────────┐
│ Dashboards │ │ Online judges │ ← evaluation
└──────────────┘ └────────┬─────────┘
│ failures become test cases
▼
┌──────────────────┐
│ Offline dataset │ → CI gate
└──────────────────┘

Do you need both for an AI agent?​

Yes, for any agent that does real work. Each one covers a blind spot in the other.

Observability without evaluation leaves you able to explain every failure you notice and unable to notice the quiet ones. You find out about wrong answers from users, which is the slowest and most expensive channel. You also have no way to say whether Tuesday's prompt change helped.

Evaluation without observability gives you scores with no explanation. A correctness score of 0.72 is a number. The trace behind a failing case is the reason. Without traces you cannot see which step went wrong, and your dataset will be built from imagined inputs rather than real ones.

A rule of thumb that holds up in practice:

If you are...Start with
Prototyping, no users yetTracing on, plus a small offline eval set
Shipping to a first group of real usersTracing, error and latency alerts, sampled online judges
Changing prompts, models, or tools oftenAn offline eval suite as a CI gate
Running a multi-step or multi-agent systemTrace-reading scorers for tool calls and routing

Quick answer: Use observability to see and debug what your agent does. Use evaluation to measure whether it does it well. Run offline evaluation before each release, and online evaluation on a sample of live traces after.

A worked example: one trace, two jobs​

Take a support agent that can look up orders and issue refunds. A customer writes, "My order arrived broken, I want my money back."

The agent looks up the order, decides the order qualifies, calls issue_refund, and replies "Done, your refund is on its way."

What observability shows. The trace has four spans: the user request, a model call that chose the lookup_order tool, the tool call itself, and a second model call that chose issue_refund. Total latency is 3.2 seconds, the cost is a few thousand tokens, and every status code is 200. Nothing is red.

What evaluation shows. A scorer that checks policy finds that the order was placed 94 days ago and the refund window is 30 days. The agent should have escalated to a human. A second scorer, which checks whether the response promised something the policy does not allow, fails too.

Neither tool alone tells the full story. The dashboard says the system is healthy. The score says the behavior is wrong. The trace then lets you see exactly where: the model never compared the order date with the policy. That is the loop in practice. Evaluation finds the problem, observability explains it, and the failing trace becomes a permanent test case.

(This scenario is an illustration we constructed, not data from a customer.)

How to run both with MLflow​

MLflow is an open-source AI engineering platform governed by the Linux Foundation, and it uses one trace for both jobs. The steps below use APIs from the MLflow GenAI documentation. Treat the code as a starting point and check parameter names against the docs for your installed version.

Step 1: Trace the agent​

Add the decorator to the functions that make up a run, and mark tools as tool spans.

import mlflow

mlflow.set_experiment("support-agent")


@mlflow.trace(span_type="TOOL")
def lookup_order(order_id: str) -> dict:
...


@mlflow.trace(span_type="TOOL")
def issue_refund(order_id: str) -> dict:
...


@mlflow.trace(span_type="AGENT")
def support_agent(question: str) -> str:
...

For supported libraries, mlflow.<library>.autolog() traces calls with one line, for example mlflow.openai.autolog(). For production, the tracing docs recommend the lightweight mlflow-tracing package, which they describe as a 95% smaller footprint than the full mlflow package, and with async logging enabled, trace logging runs in the background so it does not slow the application. For more on instrumenting, see our pages on agent observability and LLM tracing.

Step 2: Evaluate offline against a dataset​

An evaluation has three parts: a dataset, scorers, and a predict function. The dataset holds inputs and optional expectations.

from mlflow.genai.scorers import Correctness, Guidelines

dataset = [
{
"inputs": {"question": "My order from 94 days ago arrived broken. Refund me."},
"expectations": {"expected_response": "Escalates to a human; no refund issued."},
},
]

results = mlflow.genai.evaluate(
data=dataset,
predict_fn=support_agent,
scorers=[
Correctness(),
Guidelines(
name="refund_policy",
guidelines="Never promise a refund for an order older than 30 days.",
),
],
)

This is the same pattern we describe in Continuous LLM Evaluation, including how to build the dataset and wire the run into CI.

Step 3: Score the trajectory, not only the answer​

Built-in scorers include ToolCallCorrectness, which judges whether the agent called the right tools with the right arguments, ToolCallEfficiency, which flags redundant tool calls, and ConversationCompleteness and UserFrustration for multi-turn conversations. You can also write a code scorer that reads the trace directly.

from mlflow.entities import SpanType, Trace
from mlflow.genai.scorers import ToolCallCorrectness, scorer


@scorer
def at_most_one_refund(trace: Trace) -> bool:
refunds = trace.search_spans(span_type=SpanType.TOOL, name="issue_refund")
return len(refunds) <= 1


results = mlflow.genai.evaluate(
data=dataset,
predict_fn=support_agent,
scorers=[ToolCallCorrectness(), at_most_one_refund],
)

Code scorers are free and exact, so use them for hard rules like "never refund twice". Use LLM judges for qualities code cannot express. If you rely on judges, calibrate them first; our guide to LLM judge calibration shows how.

Step 4: Evaluate traces you already have​

You do not need to re-run the agent to score it. Traces from mlflow.search_traces() can be passed to mlflow.genai.evaluate() directly, with no predict_fn. The documentation notes the function "will automatically extract the inputs, outputs, and other intermediate information from the trace object."

from datetime import datetime, timedelta

since = int((datetime.now() - timedelta(days=1)).timestamp() * 1000)
traces = mlflow.search_traces(filter_string=f"timestamp > {since}")

results = mlflow.genai.evaluate(data=traces, scorers=[ToolCallCorrectness()])

This is how you turn yesterday's production traffic into a quality report, and how you reuse one set of traces across several evaluation runs without paying to regenerate them.

Step 5: Score live traffic automatically​

MLflow's automatic evaluation runs LLM judges on traces and multi-turn conversations as they are logged. It runs asynchronously, so it does not slow the application. You register a judge that uses a gateway model, then start it with a sample rate. Replace my-llm-endpoint with the name of your own AI Gateway endpoint.

from mlflow.genai.scorers import Guidelines, ScorerSamplingConfig

refund_judge = Guidelines(
name="refund_policy",
guidelines="Never promise a refund for an order older than 30 days.",
model="gateway:/my-llm-endpoint",
).register()

refund_judge.start(sampling_config=ScorerSamplingConfig(sample_rate=0.2))

The documentation lists prerequisites: a running MLflow server, tracing enabled, and a configured AI Gateway endpoint for the judge model. Multi-turn evaluation needs session IDs on the traces. It suggests a high sample rate during development and a lower one in production to control cost. The docs also note that failed evaluations are not retried automatically, so treat a missing score as "not evaluated", not "passed".

With all five steps in place, one experiment holds traces you can inspect, offline runs you can compare, and live quality scores you can chart.

Common mistakes​

Treating a green dashboard as a quality signal. Latency, error rate, and token counts describe health. They say nothing about correctness. Add at least one scorer that reads the content.

Evaluating only the final answer. An agent can reach the right answer through a wrong or wasteful path, such as calling a destructive tool when a read-only one would do. Score the trajectory too.

Building the eval set from imagined inputs. Real traces show what users actually ask. Seed your dataset from them and add every production failure you find.

Trusting an uncalibrated judge. A model-based grader is a second black box. Compare its scores to human labels on a sample before you gate a release on it.

Using the same sample for tuning and reporting. If you iterate on prompts until the offline suite passes, the suite stops measuring generalization. Keep a held-out set and refresh it from production.

Scoring every live trace forever. Judge calls cost money and add load to your gateway. Start with a high sample rate, then lower it once the signal is stable.

Buying two tools when one data model would do. Many platforms in this space, including Langfuse, LangSmith, Arize Phoenix, Braintrust, and MLflow, offer both tracing and evaluation. The useful question is whether the same trace feeds both, so you do not copy data between systems. Our comparison of agent observability tools and agent evaluation frameworks cover how each one handles this.

Is "AI observability" the same as "LLM observability"?​

Not quite, and the difference matters for the words you search with. LLM observability usually means watching individual model calls: prompts, completions, latency, tokens, and cost. AI observability, or agent observability, covers the larger system around those calls: tool use, retrieval, multi-step plans, multiple agents, and sessions that span many turns. A single agent run contains many LLM calls, and the failures that matter often sit between them.

In practice the tooling is the same. If your traces capture the model calls, the tool calls, and how they nest, you have both. We cover the model-call layer in more depth in our guide to open-source LLM tracing tools.

Where to start​

If you have no tracing today, turn it on first. Everything else depends on it, and it costs one decorator or one autolog() line. If you have tracing and no evaluation, pick the three worst failures you have seen in production, turn them into dataset rows, and write one scorer for each. That is a real eval suite, and you can grow it from there.

Then run it. The MLflow GenAI documentation has quickstarts for tracing and evaluation, and the MLflow GitHub repository is the place to report issues or ask questions.

FAQ​

What is the difference between AI agent evaluation and observability?​

Observability records what an agent did on a run: its steps, tool calls, latency, cost, and errors. Evaluation scores whether that behavior was good, using code checks, LLM judges, or human review. Observability is something you inspect, and evaluation is something you compare across runs and versions.

Is agent evaluation part of observability?​

They are separate practices that share data. Some platforms bundle them, and some treat online evaluation as part of observability because it scores live traces. A useful test: if it tells you what happened, it is observability. If it returns a quality score you can compare, it is evaluation.

What is the difference between offline and online evaluation?​

Offline evaluation runs your agent against a fixed dataset before you ship a change, typically in CI. Online evaluation scores a sample of live production traces after release. Offline catches regressions early, and online catches problems your dataset did not anticipate.

Can I do agent evaluation without tracing?​

You can score final outputs without traces, but you lose the ability to grade tool calls, routing, and other intermediate steps, and you lose the explanation for a failing score. For agents, tracing is the better foundation.

Do I need an LLM judge to evaluate an agent?​

No. Code-based checks cover hard rules like valid output format, required tool calls, and latency budgets, and they are cheap and exact. LLM judges are for qualities code cannot express, such as helpfulness or tone, and should be calibrated against human labels.

Which comes first, observability or evaluation?​

Observability, in most cases. Tracing is quick to add, and the traces it collects supply the inputs for your first evaluation dataset. Add scorers as soon as you have traces from real or realistic usage.

Does MLflow support both agent evaluation and observability?​

Yes. Open-source MLflow provides OpenTelemetry-compatible tracing and mlflow.genai.evaluate with built-in and custom scorers. The same traces can be inspected in the UI, passed to evaluation, and scored automatically as they arrive. MLflow is Apache-2.0 licensed and hosted by the Linux Foundation. Any managed MLflow offering from a vendor is a separate product from the open-source project.

Next step​

Add @mlflow.trace to one agent function today, run a handful of real requests, and open the MLflow UI to read the traces. Then pick one failure you found and write the first scorer for it with the MLflow evaluation guide.

How to Trace AI Agents and MCP Tool Calls End to End

· 16 min read

To trace an AI agent end to end, record every step of one run as a span inside a single trace: the user request, each LLM call, each tool or MCP call, and the final answer. Then group the traces by session. With MLflow Tracing, that takes a tracking server, one autolog call for your framework, and one decorator around each MCP tool call.

This guide is for engineers whose agent works in a demo and does something odd in production, and who need to see what the agent actually did. We build MLflow, so the examples use MLflow Tracing. The steps apply to any OpenTelemetry-compatible tracer.

Disclosure: the MLflow team wrote this guide.

TL;DR​

An agent trace is a tree of spans, one per step, and you add the MCP step yourself.

  • An agent run is a tree: one root AGENT span, with LLM and TOOL spans below it. A trace is that whole tree.
  • Frameworks such as the OpenAI Agents SDK, LangGraph, and the Claude Agent SDK can be traced with one autolog() call. Hand-written agent loops need the @mlflow.trace decorator.
  • An MCP tool call is a JSON-RPC tools/call request. Plain MCP client code does not record it as a span, so wrap the call in a TOOL span (or check that your framework does it for you, as PydanticAI does).
  • Use a session_id to join the traces of a multi-turn conversation. Use W3C trace-context headers over HTTP to join traces across services.
  • Everything here is OpenTelemetry-compatible, so you can send the same traces to another backend.

What does "end to end" mean for an AI agent?​

End to end means that one trace shows the full path from the user's request to the final answer, including every model call and every tool call in between. If a step is missing from the trace, you cannot say why the agent chose a wrong tool or returned a wrong answer.

A normal web request is mostly deterministic. An agent is not. The model decides at run time which tool to call, with which arguments, and how many times. Two runs of the same prompt can take different paths. That is why logs of the final answer do not help much. You need the path.

MLflow's span model is built for this. A span is one step. Spans nest in a tree, and the tree is the trace. MLflow defines span types such as AGENT (an autonomous agent operation), LLM, RETRIEVER, and TOOL (a tool execution, typically by an agent). The span object is compatible with the OpenTelemetry span spec and is exported as standard OTLP.

Here is the shape of one traced run in this guide (an illustrative example):

trace: "Where is order A-1001?"
└── run_agent (AGENT) whole run
├── chat completion (LLM) model picks get_order_status
├── call_mcp_tool (TOOL) tools/call get_order_status
└── chat completion (LLM) model writes the answer

The LLM spans in this diagram come from autologging a provider SDK. The AGENT and TOOL spans are the two you add yourself for a hand-written loop. The code below produces the AGENT and TOOL pair; we ran it and checked the span tree (see Step 3).

Who this guide is for​

This guide is for you if you build an agent that calls tools and want to answer three questions from a trace: which tool did the agent call, what did it return, and where did the time go.

It works for framework agents and hand-written loops. It also covers MCP servers, because the Model Context Protocol (MCP) is an open standard for connecting agents to tools. If your agent has no tools, a plain LLM trace is enough, and the guide to open-source LLM tracing tools is a better start.

Why MLflow for agent and MCP tracing​

MLflow is a good fit for this job if you want tracing, evaluation, and storage in one Apache-2.0 server, and you want your traces in a vendor-neutral format. MLflow is backed by the Linux Foundation. MLflow Tracing is OpenTelemetry-native: the tracking server accepts traces over OTLP at /v1/traces from any language, and traces made with the MLflow SDK can be exported to other OpenTelemetry backends.

That is not the same as "best for every setup". If you only need instrumentation and already run an observability backend, a lighter library may be enough. If your agent is not written in Python or TypeScript, you can still send traces over OTLP, but you lose the one-line autologging. The MLflow tracing overview lists what is supported.

How do you trace an AI agent end to end? Six steps​

Follow these steps in order. Each step adds one kind of visibility and works on its own.

Step 1: Run a tracking server​

The server stores traces and shows them in the trace UI. For local work, start one with:

pip install mlflow
mlflow server --port 5000

In your agent code, point MLflow at it and name an experiment. Set the experiment before you turn on tracing, so every trace lands in the same place:

import mlflow

mlflow.set_tracking_uri("http://localhost:5000")
mlflow.set_experiment("my-agent")

For a quick test without a server, a local SQLite URI such as sqlite:///mlflow.db also works. We ran the example in Step 3 against a SQLite URI; swap it in for the server URL there to run without a server.

Step 2: Turn on autologging for your agent framework​

If you use a supported framework, one call traces it. Each framework has its own autolog function:

FrameworkCallNote
OpenAI Agents SDKmlflow.openai.autolog()Captures agent handoffs and the calls to the OpenAI API (docs)
LangGraphmlflow.langchain.autolog()LangGraph tracing extends the LangChain integration (docs)
Claude Agent SDK (Python)mlflow.anthropic.autolog()Needs MLflow 3.5 or newer. Traces ClaudeSDKClient; a direct call to query() is not traced (docs)
PydanticAImlflow.pydantic_ai.autolog()Also captures MCP call_tool and list_tools (docs)

Call the autolog function once, before you create the agent or client. After that, each agent run produces a trace with its LLM calls and tool calls.

PydanticAI deserves a note. Its integration records MCP server interactions, including call_tool and list_tools, as individual spans in the trace UI. If you use PydanticAI with MCP, you may not need Step 3 at all. Check one trace first.

The full list of integrations is in the MLflow tracing docs. If your framework is not listed, go to Step 3.

Step 3: Trace MCP tool calls​

An MCP client calls a tool by sending a tools/call request to the server, as the MCP specification describes. The spec defines two standard transports, stdio and Streamable HTTP, and the call looks the same to your code on both. If your client library or framework does not trace that call, the trace shows a gap: the model asked for a tool, and then the answer appears, with nothing in between.

Close the gap by wrapping the call in a TOOL span. Wrap the whole run in an AGENT span. This example uses the official MCP Python SDK and a tiny local server.

First, the server:

server.py
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("orders")


@mcp.tool()
def get_order_status(order_id: str) -> str:
"""Look up the status of an order."""
return f"Order {order_id} shipped"


if __name__ == "__main__":
mcp.run()

Then the traced client:

client.py
import asyncio
import sys
from pathlib import Path

import mlflow
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
from mlflow.entities import SpanType

mlflow.set_tracking_uri("http://localhost:5000")
mlflow.set_experiment("my-agent")


@mlflow.trace(span_type=SpanType.TOOL)
async def call_mcp_tool(session: ClientSession, name: str, arguments: dict):
result = await session.call_tool(name, arguments)
return result.content[0].text


@mlflow.trace(span_type=SpanType.AGENT)
async def run_agent(question: str) -> str:
params = StdioServerParameters(command=sys.executable, args=[str(Path(__file__).with_name("server.py"))])
async with stdio_client(params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# A real agent lets the LLM choose the tool. It is hard-coded here.
return await call_mcp_tool(
session, "get_order_status", {"order_id": "A-1001"}
)


print(asyncio.run(run_agent("Where is order A-1001?")))

We ran this with MLflow 3.18.0 and mcp 1.30.0. The output was Order A-1001 shipped, and the trace held a root run_agent span of type AGENT with a child call_mcp_tool span of type TOOL. Because @mlflow.trace records a function's inputs and outputs, the tool span shows the tool name, the arguments, and the text the server returned.

Two notes on this code:

  • Pin mcp<2 if you copy it. The mcp package moved to a 2.x line in which FastMCP was renamed MCPServer, so this server code needs 1.x.
  • In a real agent, add your LLM provider's autolog call (Step 2). The LLM spans then appear as siblings of the tool span inside the same AGENT span, and you can read the whole decision loop in order.

Name the span after the tool, not after your wrapper, when you have many tools. A trace full of call_mcp_tool rows is hard to scan. The @mlflow.trace(name=...) argument sets the name, and mlflow.start_span(name=..., span_type=SpanType.TOOL) does the same when you need a span inside a block instead of a function.

Step 4: Group traces into sessions​

A chat agent produces one trace per turn. To debug a conversation, you need the turns together. MLflow lets you attach a session ID and a user ID to every trace created in a block of code:

import mlflow

mlflow.openai.autolog()

with mlflow.tracing.context(session_id="session-123", user="user-456"):
agent_turn("What is the status of order A-1001?") # your agent's entry point

The session_id and user parameters need MLflow 3.12.0 or newer. On older versions, set the mlflow.trace.session or mlflow.trace.user key in the trace metadata. See Track Users & Sessions.

In a web app, wrap the request handler with this context manager. Every trace from that request then carries the user and session without any change to your agent code.

Step 5: Connect traces across services​

Often the MCP server, or a sub-agent, runs in a different process or on a different host. Without extra work, each process makes its own trace, and you must match them by hand.

MLflow's distributed tracing fixes this for HTTP calls. It passes the active trace context in headers that follow the W3C TraceContext standard. The caller, inside an active span, uses get_tracing_context_headers_for_http_request to get the headers. The callee uses set_tracing_context_from_http_request_headers to read them, and its spans join the same trace. Both services must log to the same tracking server and the same experiment, or the spans end up in separate traces. The distributed tracing guide has a runnable two-service example.

There is a limit you should know about. That guide shows HTTP services. A stdio MCP server has no HTTP headers, so this method does not apply to it. We have not tested header propagation through the MCP Streamable HTTP transport, so we do not claim it works. For a stdio server, trace the tool function inside the server with @mlflow.trace, log to the same experiment, and tag both traces with the same session ID so you can find them together.

Step 6: Keep your traces portable with OpenTelemetry​

MLflow ingests and exports traces in the OpenTelemetry format, including the OpenTelemetry GenAI semantic conventions. Two things follow:

  • An agent written in Java, Go, or Rust can send spans to the MLflow server. Set OTEL_EXPORTER_OTLP_TRACES_ENDPOINT to <tracking-uri>/v1/traces, and set OTEL_EXPORTER_OTLP_TRACES_HEADERS to x-mlflow-experiment-id=<experiment-id> so the server knows which experiment gets the spans.
  • Traces from the MLflow SDK can go to other OpenTelemetry backends, so you are not locked in.

Read the OpenTelemetry integration page for setup, and the OpenTelemetry tracing announcement for background.

What should you look for in an agent trace?​

Open a trace and read the tree from top to bottom. These five patterns cover the agent failures we see most often in traces:

Pattern in the traceWhat it usually means
A TOOL span with an error, followed by a retry loopThe tool failed and the agent keeps trying. Check the tool's error text in the span output.
The same TOOL span many times with near-equal inputsThe agent is stuck. Add a step limit and look at the prompt before the loop.
A long gap with no child spanWork happens outside any traced code. Add a span around it.
A TOOL span with correct output, but a wrong final answerThe model misused the result. Look at the next LLM span's input.
The wrong tool chosen at the first LLM spanThe tool descriptions are unclear. Read the tool list the model saw.

Two habits help. First, read the failing run and one passing run of the same input side by side. The first different span is usually the cause. Second, when you fix a bug, keep the failing trace and turn it into a test case. MLflow's evaluation tools can score traces later, which closes the loop between debugging and regression tests.

What are the common mistakes when tracing agents?​

These five mistakes are common.

  • Enabling autolog after the client is created. Call autolog first, then build the agent or client.
  • Splitting one run across experiments. Distributed traces need the same tracking server and experiment. Otherwise they do not merge.
  • Tracing only the LLM. An LLM-only trace shows the model's tool request but not the tool's result. The tool span is where most failures show up.
  • Logging secrets. Tool inputs and outputs are recorded. If a tool handles passwords, tokens, or personal data, mask them before they reach the trace. MLflow has a masking guide.
  • Assuming a framework traces MCP. Some integrations do, as PydanticAI does. Others do not. Run one request and look for the tool span.

What about other tracing tools?​

You can do this with other tools. Langfuse, Arize Phoenix, Opik, OpenLIT, and OpenLLMetry all trace LLM applications, and they differ in license, hosting, and OpenTelemetry support. We compare them on one page: Best Open-Source LLM Tracing Tools in 2026. The idea in the six steps above (one trace per run, one span per step, one session ID per conversation) is not specific to MLflow, but the setup and API names differ by tool, so check each tool's docs.

For tracing multi-agent systems in particular, see our post on observability for multi-agent systems.

Can an agent read its own traces through MCP?​

Yes, in a different direction. MLflow also ships an MCP server that exposes trace operations to AI assistants. It can search and retrieve traces, analyze trace performance, log feedback, and manage tags. It is marked experimental and needs MLflow 3.5.1 or newer, installed with pip install 'mlflow[mcp]>=3.5.1'. See the MLflow MCP server docs.

This is separate from tracing your own MCP calls. It lets a coding assistant such as Claude Code look at the traces you already collected.

FAQ​

How do I trace AI agent activity end to end?​

Start an mlflow server, call your framework's autolog function (for example mlflow.openai.autolog() or mlflow.langchain.autolog()) before you create the client, and run one request. If the tree has a long gap with no child span, some work runs outside traced code. Wrap that code in @mlflow.trace and run the request again.

How do I trace MCP tool calls?​

First, run one request and look for a TOOL span under the LLM span that asked for the tool. If there is none, your framework does not trace MCP. Then put the client's call_tool call inside mlflow.start_span(name=..., span_type=SpanType.TOOL), so the span records the tool name, its arguments, and its result.

Can I trace an MCP server that runs in another process?​

For an HTTP server, yes. The client sends headers from get_tracing_context_headers_for_http_request, and the server reads them with set_tracing_context_from_http_request_headers. Both sides must log to the same tracking server and experiment, or the spans do not merge. A stdio server has no HTTP headers, so trace inside the server and use the same session ID to find its traces.

Do I need OpenTelemetry to trace an agent?​

No. You only need it when spans come from services that do not use the MLflow SDK. Those services set OTEL_EXPORTER_OTLP_TRACES_ENDPOINT to <tracking-uri>/v1/traces and pass x-mlflow-experiment-id=<experiment-id> in OTEL_EXPORTER_OTLP_TRACES_HEADERS.

How do I make agent behavior observable in production?​

Attach a user and a session to each trace (the session_id and user parameters, or the mlflow.trace.session and mlflow.trace.user metadata keys before MLflow 3.12.0), so you can filter by customer and conversation. Mask passwords, tokens, and personal data before they reach a span. When you fix a bug, keep the failing trace as a test case, so the same failure is caught next time.

Conclusion​

Before tracing, an agent bug is a guess. After tracing, it is a span you can open. Start small: run mlflow server, add the autolog call for your framework, and wrap each MCP call in a TOOL span. Run one request and read the tree.

Next step: copy the example from Step 3 into a file, run it against a local MLflow server, and open the trace in the UI. The MLflow Tracing overview shows what to add next.

Updated 2026-11-11.

Best Open-Source LLM Tracing Tools in 2026

· 11 min read

The best open-source LLM tracing tool depends on three things: whether you need a backend or only instrumentation, whether the license is truly open source, and whether traces leave your app as standard OpenTelemetry. This page ranks six tools by how much of the tracing workflow each one covers on its own, using each project's own repository and docs.

We work on MLflow Tracing, and this is the comparison we'd want if we were picking a tracer today: licenses, OpenTelemetry support, and what each tool takes to run.

Disclosure: the MLflow team wrote this guide, and MLflow is ranked first. The ranking uses one criterion: how much of the tracing workflow each tool covers on its own, from capturing traces to self-hosting the backend. License breaks ties: OSI-approved open source ranks above source-available. Each entry says where the tool falls short.

TL;DR​

  • Our ranking: MLflow, Arize Phoenix, Langfuse, Opik, OpenLIT, OpenLLMetry.
  • Need tracing, evaluation, and a model registry in one Apache-2.0 server? Look at MLflow.
  • The license matters: Arize Phoenix is source-available under Elastic License 2.0, which the Open Source Initiative does not approve as open source.
  • Need a tracing-first product with a permissive MIT core? Look at Langfuse.
  • Already run an OpenTelemetry backend and only need LLM instrumentation? Look at OpenLLMetry.

How we picked and ranked​

A tool made the list if it traces LLM or agent calls, can run on your own infrastructure, and has a public repository. We ranked them on one criterion: how much of the tracing workflow each tool covers on its own. License breaks ties. The workflow has five steps:

  1. Capture traces from any language through OpenTelemetry.
  2. Debug them in a UI.
  3. Track cost and sessions.
  4. Evaluate what you traced.
  5. Self-host with as little as possible to run.

MLflow and Arize Phoenix cover all five steps with a single process. MLflow ranks above Phoenix because MLflow is Apache-2.0, an OSI-approved open-source license, while Phoenix is Elastic License 2.0, which is source-available. Langfuse and Opik cover the first four steps, but a self-hosted deployment runs several services, and Opik's stack is the larger of the two. OpenLIT is lighter to run, but its README documents a sessions view only for coding agents. OpenLLMetry is last because it ships no UI or backend of its own. Facts come from each project's GitHub repository, license file, README, and docs, checked on 2026-11-02. Versions and licenses change, so check the linked source before you commit.

1. MLflow: best for tracing, evaluation, and the model lifecycle in one Apache-2.0 server​

MLflow is an Apache-2.0 open-source platform for agents, LLMs, and ML models, a Linux Foundation project. MLflow Tracing captures LLM and agent calls as OpenTelemetry-compatible traces, and the open-source MLflow server accepts traces over OTLP from any OpenTelemetry-instrumented app.

Evidence: The MLflow README lists observability, evaluation, and OpenTelemetry integration, and the repository is licensed Apache-2.0. MLflow 3.6.0 added an OTLP endpoint on the tracking server (release notes; see also Full OpenTelemetry Support in MLflow Tracing). MLflow 3.16.0 made a redesigned trace explorer the default and added span links (release notes). The latest release at the time of writing is 3.17.2, published 2026-10-21.

A minimal setup for an OpenAI app is a running server plus two lines of code:

import mlflow

mlflow.set_tracking_uri("http://localhost:5000") # server started with `mlflow server --port 5000`
mlflow.openai.autolog()

Why it's here: MLflow covers every step on its own. One mlflow server process stores traces, shows them in the trace UI, groups them by user and session, records token usage and cost, and runs LLM-judge evaluation on them. The same server also tracks experiments and registers models if you need that. The tradeoff is breadth: GenAI-only tools can move faster on a narrow feature. Hosted MLflow services exist, but this entry describes the open-source project only. For a deeper look at agents, see best LLM tracing tools for multi-agent systems.

2. Arize Phoenix: best for local trace and eval debugging with OpenInference​

Arize Phoenix is a source-available, self-hosted LLM tracing and evaluation app built on OpenTelemetry. It uses OpenInference instrumentation for frameworks such as LangGraph, CrewAI, LlamaIndex, and DSPy. Its code is released under Elastic License 2.0, which the Open Source Initiative (OSI) does not approve as an open-source license.

Evidence: The Phoenix README describes tracing "using OpenTelemetry-based instrumentation" and lists Docker Compose and Kubernetes/Helm for self-hosting. The LICENSE file is Elastic License 2.0 (ELv2). Arize sells a separate managed product, Arize AX, that accepts the same instrumentation.

Why it's here: Phoenix also covers every step in one process: phoenix serve starts the app, and its docs cover sessions and cost tracking. It ranks below MLflow only on license. It is a good fit when you want one local app for traces and evals and you are comfortable with ELv2. ELv2 limits offering the software as a hosted service, so read it before you build a product on it.

3. Langfuse: best for a tracing-first product with a permissive core​

Langfuse is an open-source LLM engineering platform for tracing, evaluation, and prompt management. Most of the repository is MIT licensed, and the ee/ directories carry a separate license. You can self-host it with Docker Compose. Langfuse became part of ClickHouse in January 2026.

Evidence: The Langfuse README shows an MIT badge, documents self-hosting, and states it has been "part of ClickHouse" since January 2026. The LICENSE file says content under the ee/ directories is licensed separately. The latest release at the time of writing is v4.72.0, published 2026-10-29.

Why it's here: Langfuse covers the first four steps. It accepts OpenTelemetry traces and documents sessions and token and cost tracking. Self-hosting is heavier: its Docker Compose file runs web and worker containers plus Postgres, ClickHouse, Redis, and MinIO. It is a strong, focused choice if tracing and prompt management are the whole job. If you also track classic ML experiments or register models, you will run a second tool. Check Langfuse's open-source docs for which features sit behind the ee/ license before you plan around them.

4. Opik: best for a fully Apache-2.0 platform with evaluation built in​

Opik is an open-source LLM observability and evaluation platform built by Comet. The full platform, including the backend and web app, is Apache-2.0 licensed and free to self-host. It covers agent tracing, LLM evaluation, prompt management, and production monitoring in a single deployment.

Evidence: The Opik README states that the repository includes "the server backend, web application, tracing, datasets, experiments, evaluations, prompt management" under Apache-2.0. The latest release at the time of writing is 2.2.137, published 2026-10-30.

Why it's here: Opik covers the first four steps. It accepts OpenTelemetry traces, logs conversations, and tracks cost. It is the heaviest to self-host here: its Docker Compose file runs MySQL, Redis, ClickHouse, ZooKeeper, and MinIO next to its backend and frontend services. Opik is the option to check if you want every feature under one permissive license with no enterprise-only tier for self-hosting. Its README comparison table is written by Comet, so treat its claims about other tools as one vendor's view and verify them yourself.

5. OpenLIT: best for OpenTelemetry-native tracing with GPU and cost monitoring​

OpenLIT is an Apache-2.0 open-source platform that traces, evaluates, and guards AI agents using OpenTelemetry. It also monitors cost and GPU usage. It auto-instruments LLM providers, frameworks, and vector databases, and exports standard OpenTelemetry traces and metrics to an endpoint you choose.

Evidence: The OpenLIT README states that it is "free to self-host under Apache 2.0," lists 70+ integrations, and shows setup by pointing OTEL_EXPORTER_OTLP_ENDPOINT at a collector. The latest release at the time of writing is openlit-2.1.1, published 2026-10-26.

Why it's here: OpenLIT is light to self-host: its Docker Compose file runs OpenLIT, ClickHouse, and NATS. It covers capture, the UI, cost, and evaluation, but its README documents a sessions view only for coding agents. It suits teams that run their own models and care about GPU metrics next to traces. Its GitHub community (about 2,900 stars on 2026-11-02) is smaller than most tools here, so check that the integrations you need are maintained.

6. OpenLLMetry: best when you already have an OpenTelemetry backend​

OpenLLMetry is an Apache-2.0 set of OpenTelemetry instrumentations for LLM providers and vector databases, plus the Traceloop SDK. It is instrumentation, not a trace viewer. It sends standard OpenTelemetry data to backends you already run, such as Datadog or Honeycomb.

Evidence: The OpenLLMetry README says the repository contains "standard OpenTelemetry instrumentations for LLM providers and Vector DBs" and that its semantic conventions are now part of OpenTelemetry. The repository is Apache-2.0. The latest release at the time of writing is 0.62.4, published 2026-09-29.

Why it's here: If your platform team already runs an observability stack, OpenLLMetry adds LLM spans without a new vendor. The repository ships instrumentation, not a trace viewer, so pair it with a backend that shows and stores the traces.

Which one should you pick?​

If you needStart with
Tracing, evaluation, and a model registry in one serverMLflow
A local app for trace and eval debugging, with ELv2 acceptedArize Phoenix
A tracing-first product with prompt managementLangfuse
Everything under Apache-2.0, evaluation includedOpik
OpenTelemetry tracing plus GPU and cost monitoringOpenLIT
LLM spans in an OpenTelemetry stack you already runOpenLLMetry

Because every tool here accepts or emits OpenTelemetry, you can often change backends without re-instrumenting your app. Attribute names differ, though: Phoenix uses OpenInference conventions, while OpenLLMetry has contributed its conventions to OpenTelemetry, so the same span can look different in another backend. Test with your own traces before you commit. For more on the standard, read OpenTelemetry for LLMs, and for a wider survey that includes commercial products, see Top LLM Observability Tools in 2026.

FAQ​

What is the best open-source LLM tracing tool?​

On the criterion in this guide, MLflow ranks first: one Apache-2.0 server process covers OpenTelemetry capture, the trace UI, cost and sessions, and evaluation. Arize Phoenix also covers every step in one process and ranks second because its Elastic License 2.0 is source-available rather than OSI-approved open source. If you already run an OpenTelemetry backend, OpenLLMetry may be all you need, so weigh license, self-hosting, and OpenTelemetry support against your own stack.

Is Arize Phoenix open source?​

Phoenix publishes its source code under Elastic License 2.0. The Open Source Initiative does not approve that license, so it is usually called source-available. You can self-host it and read the code, but ELv2 restricts offering the software as a managed service.

Do I need OpenTelemetry for LLM tracing?​

You do not need it, but it helps. OpenTelemetry is a vendor-neutral standard, so traces from OpenTelemetry-based tools can usually go to more than one backend. MLflow, Phoenix, OpenLIT, and OpenLLMetry all build on it.

Can I self-host these tools?​

Yes. Every tool here can run on your own infrastructure. OpenLLMetry is the exception in kind: it is instrumentation, so you also need a backend to receive the traces.

Next step​

Pick one tool from the table and trace a single real request through it this week. If MLflow is your shortlist, the MLflow tracing quickstart gets a first trace running in a few minutes.