Trace with Built-In Traces
You can trace your pipelines through built-in traces in the UI. Traces give you full observability into your deployed pipelines and agents without adding a separate observability tool to your stack: everything stays on the same infrastructure your pipelines already run on.
For more advanced use cases, use the Haystack Platform MCP server to interact with traces and other resources. For details, see MCP Servers.
About This Task
Traces require no setup. As soon as you deploy or redeploy a pipeline, it starts generating traces automatically for every run. Indexes are the exception: an index records a trace of how a file was converted and split only when you ask for one while reindexing a single file. For details, see Capture an Indexing Trace When Reindexing a File.
Traces are collected for queries run on or after 25 June 2026. Before that date, traces are not available. To collect traces for pipelines deployed before that date, undeploy the pipeline and deploy it again.
To learn more about traces, see Monitor Pipeline Performance and Trace Your Pipelines. For what a trace records and how long it's kept, see Trace Contents and Retention.
View Traces
- Log in to Haystack Enterprise Platform.
- Click Pipelines, find the pipelines whose traces you want to see, and click Analytics next to it.
- Open Traces. You can see a list of all traces for the pipeline, each with its input, status, source, duration, total tokens, and date and time. Each trace represents the full journey of a single request as it moves through the pipeline.
To see where a streamed run's time went, hover over the duration in the trace header: it shows the time before the run, the run, and after the run. An Interrupted tag marks a run whose client left before the stream ended. For details, see Read a Trace's Duration.
Filter traces by status, duration, source, or date range to narrow down the list to a release window or a specific day. Filter by status (Success, Failed, Degraded, or Cancelled) to isolate problem runs. A run the client aborted, for example by closing a chat stream early, is Cancelled, not Failed. Sort by duration to find the slowest runs, or search by trace ID or input text to find a specific run, for example, one a customer reported. Select All in the source filter to clear the source constraint and show traces from every source.
View Trace Details
- On the Traces page, click a trace to open its details:
- Use the top of the page to check the key information about the trace, including the pipeline version, status, source, root cause components, and more. For streamed runs, the header also shows Time to first token next to Duration: how long the run took to produce its first token. Click it to see each streamed generation's own value. An Agent has one numbered row per model call. Span details show the same metric for spans that streamed. The metric is hidden when the run didn't stream or no first-token time was recorded. If the run replayed an earlier session, a Replayed tag appears next to the status. To investigate this run with a coding agent, copy the trace ID shown here. For details, see Investigate Traces with a Coding Agent.
- Use the Spans section to see a hierarchical tree of all spans in the trace. You can search spans by name and filter by status. The Waterfall panel shows a timeline of all spans in the trace. You can see the start and end time of each span, and the duration of each span. Click a span to select it and see its details. Expand or collapse a span to see its children or parents.
- Use the Logs section to see the logs related to the selected span or the overall trace.
- If the trace is associated with a search session, a Session Files tab appears. Open it to browse every file created during that session: click a
.txt,.json,.yaml,.yml, or.pyfile to preview it in a read-only code editor, or a.mdfile to preview it as rendered Markdown, or download any file directly from the list or the preview.
Drill into any component to see which one took the longest or consumed the most tokens. When a run fails, the trace names the root-cause component.
You can use Fix with AI to fix failed traces with an AI assistant.
Debug Failed and Degraded Runs
To find out why a run failed or degraded, or to re-run one of its components in Builder with the original input, see Debug Failed and Degraded Runs from Traces.
Capture an Indexing Trace When Reindexing a File
To debug indexing results, capture an indexing trace: it shows how a file was converted and split. Unlike query pipelines, an index records a trace only when you ask for one while reindexing a single file with the REST API. For instructions, see Capture an Indexing Trace with the REST API.
To see the traces of an index in the UI, open the index and click the Traces tab.
Model calls in indexing traces count toward your spend on the Cost Management page. For details, see See the Cost of Indexing.
Evaluate a Conversation from a Trace
To check a pipeline against its Evaluation goals, open the pipeline's Evaluation tab. See Check Whether Your Pipeline Meets Its Evaluation Goals. To judge a whole conversation with one of the pipeline's Experiments without leaving the trace, see Evaluate a Conversation from a Trace.
Investigate Traces with a Coding Agent
If you're debugging from your IDE, or need to sift through dozens of runs at once, point a coding agent at your traces through the Haystack Platform MCP server instead of reviewing them one by one in the UI. The MCP server lets your agent list and read traces, including logs and span tags, so it can look for patterns across many runs at scale. For details, see MCP Servers.
To investigate a specific run, copy its trace ID from the trace in the UI and give it to your coding agent, the Haystack Platform MCP server, or the AI assistant. You can use either the trace ID or the query ID. If the ID doesn't match a trace in the pipeline or deployment you query, you get a not found error, so check that you're querying the right pipeline.
Navigate Between Traces and Search History
On the Traces page, next to a trace, click More Actions > View in History. This switches to the History tab within Analytics and keeps you on the same page, with the trace's query already selected.
You can also open the Trace Detail page directly from a query's detailed view in Search History.
To open the trace for a query you just ran in Playground or Prompt Explorer, click the View trace (bug) icon below the answer. Traces can take a few seconds to appear after a query.
Compare Traces
A change to a pipeline, like a different model or a reworked prompt, can improve your output but also change what the pipeline costs and how it behaves. Compare two traces side by side to see how duration and token consumption moved at each component, and how the answer changed, with differences highlighted. For example, if you swap in a larger generation model, Compare shows the added duration and tokens at the generation step. You can also catch unintended regressions by running the same input against a past pipeline version and the current one.
To compare two pipeline versions across many test cases instead of two traces, compare the versions in an Experiment. For details, see Compare Two Pipeline Versions.
- On the Traces page, enable Compare.
- Choose up to two traces to compare. Compare works well when you run the same input against two different pipeline versions.
- Choose a component from the pipeline run section to compare its inputs and outputs, duration, and token consumption for each trace.
Export Traces as JSON
Export a trace as JSON from the Traces list or from an open trace's detail page: click More Actions > Export as JSON next to the trace or in its detail view.
Related Information
Was this page helpful?