microsoft / microsoft/aspire

Dashboard: show contextual subtitle for `invoke_agent` and `execute_tool` spans in trace list

Open
#16,685 0 comments 0 reactions 0 assignees View on GitHub
area-dashboard
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Problem

In the trace list view, agent spans are visually indistinguishable from each other because the span name alone (e.g. `invoke_agent copilotcli`, `execute_tool run_in_terminal`) doesn't convey what the span is *about*. You have to click into each span to see attributes.

This is especially painful when:
- A list of agent traces all show `invoke_agent copilotcli` — no way to tell which run did what.

Image

- A single turn fans out to 10+ `execute_tool bash` spans, all named identically.

Image

## Proposal

One option: show a short, truncated subtitle next to the span name in the root trace list view and waterfall view, sourced from existing span attributes (no new instrumentation needed). Some starting ideas for what to surface:

| Span | Possible subtitle source |
|------|-----------------|
| `invoke_agent` | First user message (truncated) |
| `execute_tool` | Something derived from `gen_ai.tool.call.arguments` — e.g. `command` for `run_in_terminal`, `filePath` for `read_file`, `query` for `grep_search`, with a generic fallback |
| `chat` | Last user turn content (truncated). Helps distinguish multi-turn or fan-out chat spans where only the model name currently shows |

### UI toggle

A setting to toggle subtitles on/off (e.g. in trace view options, persisted) would let users opt in when they want the extra context and avoid noise otherwise. Default could be **off** to preserve current behavior.

## Notes

- Pure UI change — data sources already exist on the spans (`gen_ai.tool.call.arguments`, prompt/message attributes are already visible in the span detail panel).
- Truncation is required; some tool args (e.g. `multi_replace_string_in_file`) are very large.
- PII consideration: this surfaces prompt/argument content one level higher in the UI, but it's the same data already shown one click away. The toggle also gives users an opt-out.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.