Skip to content

AI Analysis

Every trace and span in the Traces detail view has an AI Analysis tab. Use it to turn raw OpenTelemetry data into a structured review instead of reading spans by hand.

Analysis runs at two scopes:

  • Trace hierarchy analysis (the AI Analysis tab in the left-hand view-mode row): reviews the root span and every child span together, so you can understand the full request - agent path, tool calls, model calls, retries, errors, and cost drivers.
  • Individual span analysis (the AI Analysis tab in the right-hand attributes panel): focuses on the single span currently selected, for when you need to inspect one model call, tool execution, retrieval step, error, or latency hotspot.

Analysis dimensions

Each run is broken into dimension tabs:

  • Strengths: what the trace did well - efficient paths, good cache usage, appropriate model choice.
  • Improvements: concrete, actionable changes, each with a severity, an explanation, and a suggested fix shown as a word-diff preview.
  • Wrong turns: retries, repeated span names, and other signs the agent backtracked or looped.
  • Cost: cost per call, the most expensive span, and where spend concentrates.
  • Token efficiency: input/output/cache/reasoning token usage, duplicate tool or retrieval inputs, and repeated context.
  • Path: the request's execution path across services, tools, databases, and HTTP calls.

Run analysis from trace details

  1. Open a trace from the Traces page or from a trace widget.
  2. Select the AI Analysis tab - in the left panel for the whole trace, or in the right panel for the currently selected span.
  3. Click Analyze. Progress streams in as the analysis runs.
  4. When the run completes, it's saved to a run history tab so you can revisit it without re-running. Use Re-run only when the trace data or your investigation question has changed.

Each finding card includes a Try in Chat button that hands the finding off to Compass with context pre-filled, so you can keep investigating conversationally instead of staying in the panel.

Run analysis from Compass

You can also ask Compass to analyze traces or spans by natural language - Compass has dedicated tools for running or retrieving AI Analysis runs, including by session, user, or any custom span attribute:

"Analyze this trace hierarchy"
"Review span <span_id> for token waste"
"Find cost optimization opportunities for traces where session.id is dc7b1ba1-..."
"Analyze the slowest traces from the last 24 hours"

When Compass references a trace or span in its answer, ARMS renders clickable trace/span pills so you can jump back into the trace detail view.

Copyright © 2026 elsai foundry.