> ## Documentation Index
> Fetch the complete documentation index at: https://mcp-eval.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics & Tracing

> OTEL traces as source of truth — metrics, span tree, coverage, and where to find artifacts.

### Traces → metrics

The session writes OTEL spans to JSONL; mcp-eval converts them to rich metrics:

* Tool calls (names, args, times, errors)
* Iteration count, response latency
* Token and cost estimates
* Tool coverage by server (available vs used)

Sources:

* [session.py](https://github.com/lastmile-ai/mcp-eval/blob/main/src/mcp_eval/session.py)
* [metrics.py](https://github.com/lastmile-ai/mcp-eval/blob/main/src/mcp_eval/metrics.py)
* [span\_tree.py](https://github.com/lastmile-ai/mcp-eval/blob/main/src/mcp_eval/otel/span_tree.py)

### Span tree analysis

`SpanTree` enables:

* LLM rephrasing loop detection
* Inefficient tool paths analysis
* Error recovery sequences

### Artifacts

* Traces: `./test-reports/*.jsonl`
* Per‑test JSON results: `./test-reports/*_results.json`
* Combined JSON/Markdown/HTML (via runner options)
