Skip to content

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

@zhichli

Description

@zhichli

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions