Skip to content

feat(SpanBarRow): add GenAI span type icons for agentic, LLM, tool, and retrieval spans#3811

Open
bhuvan-somisetty wants to merge 1 commit intojaegertracing:mainfrom
bhuvan-somisetty:feat/genai-span-icons
Open

feat(SpanBarRow): add GenAI span type icons for agentic, LLM, tool, and retrieval spans#3811
bhuvan-somisetty wants to merge 1 commit intojaegertracing:mainfrom
bhuvan-somisetty:feat/genai-span-icons

Conversation

@bhuvan-somisetty
Copy link
Copy Markdown

Closes #3810

SpanBarRow currently has icons only for error state, links, and RPC connections. When a trace follows the OTel GenAI semantic conventions, every span looks identical in the waterfall regardless of whether it is an agent invocation, an LLM call, a tool execution, or a RAG retrieval step. This makes it hard to scan a GenAI trace at a glance.

This adds a GenAISpanIcon component that reads gen_ai.operation.name from span.attributes and renders one of five icons from react-icons/io5 (already bundled). The icon is injected into the existing icon area in SpanBarRow, next to the error and link icons.

For any span with no gen_ai.* attributes, classifySpan returns 'STANDARD' and GenAISpanIcon returns null, so the change is completely invisible for non-GenAI traces.

The classifySpan and isGenAITrace utilities in src/utils/genai/detect.ts are shared with the attribute renderer work in #3809. Since that PR is still open, detect.ts is included here as well so this branch is self-contained. Once one of the two merges, the other can drop the duplicate file.

Tested by rendering GenAISpanIcon with each gen_ai.operation.name value and confirming the correct aria-label, and confirming null return for a span with no gen_ai.* attributes.

Copilot AI review requested due to automatic review settings May 5, 2026 04:27
@bhuvan-somisetty bhuvan-somisetty requested a review from a team as a code owner May 5, 2026 04:27
@github-actions github-actions Bot added the pr-quota-reached PR is on hold due to quota limits for new contributors label May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Hi @bhuvan-somisetty, thanks for your contribution! To ensure quality reviews, we limit how many concurrent PRs new contributors can open:

  • Open: 2
  • Limit: 1

This PR is currently on hold. We will automatically move this into the review queue once your existing PRs are merged or closed.

Please see our Contributing Guidelines for details on our tiered quota policy.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GenAI-aware span classification and timeline iconography to Jaeger UI so GenAI traces are easier to scan in the TraceTimelineViewer. It also pulls in shared detection utilities that appear intended to support the related GenAI attribute-rendering work.

Changes:

  • Adds classifySpan / isGenAITrace helpers and shared GenAI attribute-key metadata in src/utils/genai/detect.ts.
  • Introduces a new GenAISpanIcon component that maps classified GenAI spans to react-icons/io5 icons.
  • Wires the icon into SpanBarRow and adds new unit tests for the detection helper and icon component.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/jaeger-ui/src/utils/genai/detect.ts Adds GenAI span classification helpers and shared rich-media attribute key metadata.
packages/jaeger-ui/src/utils/genai/detect.test.ts Adds unit tests for GenAI attribute detection and span classification.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx Injects the new GenAI icon into the timeline row label area.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/GenAISpanIcon.tsx New component that chooses an icon/label from classifySpan(span).
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/GenAISpanIcon.test.tsx Adds focused tests for null rendering, labels, and className passthrough.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { classifySpan, type GenAISpanKind } from '../../../utils/genai/detect';
import { IOtelSpan } from '../../../types/otel';

type IconComponent = React.ComponentType<{ className?: string }>;
{!hasOwnError && hasChildError && (
<IoAlert className="SpanBarRow--errorIcon SpanBarRow--errorIcon--hollow" />
)}
<GenAISpanIcon span={span} className="SpanBarRow--genAIIcon" />
{!hasOwnError && hasChildError && (
<IoAlert className="SpanBarRow--errorIcon SpanBarRow--errorIcon--hollow" />
)}
<GenAISpanIcon span={span} className="SpanBarRow--genAIIcon" />
Comment on lines +18 to +24
const KIND_ICON: Record<Exclude<GenAISpanKind, 'STANDARD'>, IconComponent> = {
AGENT: IoHardwareChipOutline,
LLM_CALL: IoFlashOutline,
TOOL_CALL: IoBuildOutline,
RETRIEVAL: IoServerOutline,
UNKNOWN_GENAI: IoStarOutline,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-quota-reached PR is on hold due to quota limits for new contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(SpanBarRow): add GenAI span type icons for agentic, LLM, tool-call, and retrieval spans

2 participants