The problem: the answer is bad, but where?
An application built on a language model is almost never a single call. It is a chain: retrieve documents, assemble a prompt, call the model, parse the answer, maybe call a tool, and repeat. When the final answer is bad, the fault can lie in any link, and the faulty link is almost never the suspected one.
The useful distinction is this. Classic monitoring answers "is the service up?": availability, latency, error rate. Observability answers "why did it say that?": which documents were retrieved, which exact prompt was sent, how many tokens were burned, which version was running.
The analogy: knowing the car is moving, versus understanding why it drinks fuel and takes the wrong road.
- The trace: a request's full journey through every component.
- The metrics: latency, cost, tokens, error rate.
- The evaluation: a quality score attached to the answer, from a model judge or from the user.
The first two predate language models and appear unchanged in any distributed system. The third is specific to the field, because the output is neither right nor wrong in a program's sense: no error code ever says the answer was hollow.
The trace: a tree, not a list
A trace is the end-to-end record of one request. It is made of spans, the word means an interval of time, and the usage stuck: a span is a step, with a start, an end, and whatever you attach to it.
The thing to grasp is that spans are nested, not sequential: the model call sits inside the generation step, which sits inside the whole request.

A typical chain gives this tree:
- User request, the root span
- Retrieval, querying the vector store
- Prompt assembly, inserting documents and history
- Model call, almost always the longest span
- Parsing, extracting data from the answer
- Tool call, to an external interface or a database
What a span must capture
- Input and output, in full. For a model-call span, that means the complete prompt and the complete answer. This is what separates model observability from classic monitoring: elsewhere you record that a call happened; here you record what was said.
- Duration, to find bottlenecks.
- Technical context: which model, which version, which temperature, which limits. Version is the field everyone omits and everyone needs three months later.
- Token counts, input and output separately, which determine cost.
- Errors, with message and code.
The questions a trace answers
This is where the value shows, because each diagnosis points at a different link:
| Symptom | What the trace reveals | Where the fault really is |
|---|---|---|
| Off-topic answer | The retrieved documents were not about the topic | Retrieval, not the model |
| Fabricated answer | The context did not hold the requested information | The corpus, or retrieval |
| High latency | The prompt sent ran to tens of thousands of tokens | Prompt assembly |
| Rising cost | The system prompt doubled in length at the last deploy | An unmeasured change |
The first two rows carry the main lesson: most bad answers from a document-grounded system are not model defects. Without traces you blame the model and switch vendor, which fixes nothing. It is the same split described in RAG evaluation, which measures retrieval and writing separately.
The standard underneath the tools
Before the products, know the layer beneath, because that is the durable part.
OpenTelemetry is the open instrumentation standard, long used well beyond artificial intelligence: it is what defines traces and spans across the software industry. Standardisation work for generative AI is under way, with naming conventions covering spans, metrics and events, including for common model providers. Those conventions are still evolving: the principle is settled, the exact attribute names should be checked in the documentation before being quoted.
What this changes, very concretely: if your application emits traces in the standard format, switching observability tools does not require re-instrumenting the code. You redirect the export. It is the most durable selection criterion on this page, and the one that never appears in comparison tables.
The platforms
Three names recur. What follows describes what they do, not which is best, that depends entirely on your dominant constraint, and products change.
LangSmith
Built by the makers of LangChain. Automatic tracing if the application is built on LangChain, client-library tracing otherwise; span-tree visualisation with each step's content; search and filtering on metadata.

The most useful mechanism of such a platform is not the display but the trace-to-evaluation loop: spot a problematic trace in production, add it to the evaluation set with the expected answer, and it becomes a permanent test case. After a few months, the evaluation set reflects the service's real failures rather than the cases imagined at the start. That is the mechanism described in building your own evaluation, and observability is what feeds it.
Arize and Phoenix
Arize is a machine-learning observability platform with one distinctive angle: analysis of embeddings, the numeric representations of texts (see text embeddings). Arize maintains Phoenix, an open-source, self-hostable version.

Embeddings live in a space of hundreds of dimensions, which cannot be drawn. Projection techniques (t-SNE and UMAP are the two commonest) flatten them onto a plane while roughly preserving proximity: what was close stays close, what was far stays far.
Two defects then become visible that no metric reports. Clusters of user questions with no nearby document: the topics your corpus says nothing about, and on which the system invents. Documents nothing ever retrieves: content weighing down the index without ever being used.
One methodological caveat: these projections distort. Two points adjacent on the picture are probably adjacent in the original space, but distances read off the screen carry no quantitative meaning. It is a tool for finding where to look, not for measuring.
Langfuse
Open source, self-hostable or available as a managed service. Tracing through a client library or the common integrations, scores attachable to traces, prompt management, evaluation sets built from traces, cost and latency dashboards.
Its distinguishing argument is not functional but legal: traces never leave your infrastructure. The next section explains why that carries more weight than it looks.
The table, in verifiable facts
Tool comparison tables age fast and ratings like "excellent" cannot be checked. Here are only the structural characteristics, the ones that actually decide:
| Characteristic | LangSmith | Arize / Phoenix | Langfuse |
|---|---|---|---|
| Distribution model | Managed, proprietary | Managed, plus open-source Phoenix | Open source, plus a managed offer |
| Self-hosting | No | Yes, via Phoenix | Yes |
| Projected embedding analysis | No | Yes, its distinctive feature | No |
| Built-in prompt management | Yes | No | Yes |
In most real cases the deciding criterion is none of these: it is whether trace data may leave the company. That question alone settles half the table.
Traces are a personal-data file
This is the most important point on the page for a legal reader, and the one technical documentation covers in a single line.
A trace holds the complete prompt and the complete answer. The complete prompt holds everything the user wrote, plus every document attached to it. In other words, the trace holds everything the system saw.
Four consequences, in the order they arise:
- It is a processing of personal data (PII) as soon as users are identifiable. Lawful basis, purpose, notice to data subjects, retention period: all of it applies.
- Sending traces to a third party is a transfer. To a service hosted outside the European Union, it is an international transfer with its own regime. The choice between a managed platform and self-hosting is therefore not just a convenience trade-off.
- A retention period must be decided. A trace is useful for a few weeks of diagnosis; by default it is kept forever, because nobody configures a purge.
- Redaction must happen before export, not in the viewing interface. Masking on display achieves nothing: the data has already left and been stored.
See data governance for the general framework.
The metrics, and how to read them
Why latency is never read as an average
An average hides exactly what you are looking for. If ninety-nine requests take one second and the hundredth takes thirty, the average is 1.3 seconds, a reassuring figure describing a service where one user in a hundred waits half a minute.
So you read percentiles. The 50th percentile, P50, is the value half the requests beat: the typical experience. P95 is the value 95% of requests stay under; P99, the value 99% stay under. Those two describe the bad days, and they are what produce complaints.
On this kind of application the P50-to-P99 gap is usually wide, for an intrinsic reason: response time depends on how many tokens are generated, and a long answer mechanically takes longer than a short one. A high P99 therefore often signals a population of requests that trigger long answers, not an outage.
What to track
- Latency, as P50, P95 and P99. And separately time to first token, which is what the user perceives as responsiveness, distinct from total duration.
- Cost, per request, per user, per day, with anomaly alerting. See cutting the bill.
- Quality, from automatic scoring of a sample and from explicit user feedback.
- Technical error rate, distinct from the bad-answer rate: a service can return 200 on everything and still talk nonsense.
- Similarity scores of retrieved documents, a leading indicator of drift in the corpus or in the queries. See monitoring and drift.
Two engineering constraints people meet too late
Export must never block
Tracing must be invisible to the user. Modern libraries buffer traces in memory and ship them in batches in the background. The property to demand is explicit: if the observability service goes down, the application keeps running and loses traces. The reverse (an application that stops because its measurement tool is unavailable) has happened, and it is an outage caused by the tool meant to diagnose outages.
Tracing everything is expensive
A full trace weighs several times the prompt and answer combined. On high-traffic services, trace storage becomes a budget line of its own, and export consumes bandwidth.
Hence sampling: only a fraction of traffic is retained in full. The rule that works layers three strata, a random sample of ordinary traffic, all requests that errored or ran abnormally slow, and all requests that received negative feedback. You keep every interesting case and only a share of the routine ones.
One consequence to know: a service sampling at a low rate cannot later retrieve the trace of a specific request a user complains about. If that capability is required (for a complaint, an audit, a contractual obligation) it is decided when the sampling is configured, not afterwards.
Why it matters
The module's usual anchor applies here too. Recording execution steps in a tree of spans is standard practice, standardised by OpenTelemetry long before language models and carried over unchanged.
What can rise above that lives in the automatic decisions taken from the traces: the mechanism that chooses which to keep based on an anomaly signal rather than at random; the one that automatically feeds an evaluation set from observed failures; the one that pins a quality regression to a specific version change; the one that detects a bad answer with no user having complained. Faced with such a description, the question to ask is simple: what does the system do with the trace, beyond displaying it?
1. A document assistant gives off-topic answers. What does the trace most often reveal, according to the page?
2. Why does the page treat a trace as a file of personal data?
3. 99 requests take 1 second, the hundredth takes 30 seconds. Why does the page forbid reading latency as an average?
4. Tracing all traffic is expensive. Which sampling rule does the page recommend?
5. The observability service goes down. What should happen on the application side, according to the page?