Skip to content

ref(ai-insights): switch to gen_ai.operation.name/type#104673

Merged
obostjancic merged 12 commits intomasterfrom
ogi/tet-1527-update-product-logic-to-use-gen_aioperationname
Dec 11, 2025
Merged

ref(ai-insights): switch to gen_ai.operation.name/type#104673
obostjancic merged 12 commits intomasterfrom
ogi/tet-1527-update-product-logic-to-use-gen_aioperationname

Conversation

@obostjancic
Copy link
Copy Markdown
Member

Migrated AI span detection from span.op based matching (e.g., span.op:gen_ai.*, span.op:gen_ai.invoke_agent) to use gen_ai.operation.type and gen_ai.operation.name attributes .

@obostjancic obostjancic requested review from a team as code owners December 10, 2025 11:22
@linear
Copy link
Copy Markdown

linear bot commented Dec 10, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 10, 2025
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: MCP span attributes never shown after op removal

The op parameter was removed from all getHighlightedSpanAttributes call sites, but the function still uses op?.startsWith('mcp.') to detect MCP spans and display their highlighted attributes (tool name, resource URI, prompt name, transport). Since op is never passed, MCP spans will no longer show these attributes in the trace drawer, breaking existing MCP functionality that still uses span.op based detection.

static/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections/description.tsx#L283-L287

hideNodeActions={hideNodeActions}
highlightedAttributes={getHighlightedSpanAttributes({
attributes,
spanId: span.event_id,
})}

static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/description.tsx#L200-L204

hideNodeActions={hideNodeActions}
highlightedAttributes={getHighlightedSpanAttributes({
attributes: span.data,
spanId: span.span_id,
})}

static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/highlights.tsx#L90-L94

hideNodeActions={props.hideNodeActions}
highlightedAttributes={getHighlightedSpanAttributes({
attributes: props.event.contexts.trace?.data,
spanId: props.node.value.span_id,
})}

Fix in Cursor Fix in Web


Bug: MCP span attributes never shown after op removal

The op parameter was removed from all getHighlightedSpanAttributes call sites, but the function still uses op?.startsWith('mcp.') to detect MCP spans and display their highlighted attributes (tool name, resource URI, prompt name, transport). Since op is never passed, MCP spans will no longer show these attributes in the trace drawer, breaking existing MCP functionality that still uses span.op based detection.

static/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections/description.tsx#L283-L287

hideNodeActions={hideNodeActions}
highlightedAttributes={getHighlightedSpanAttributes({
attributes,
spanId: span.event_id,
})}

static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/description.tsx#L200-L204

hideNodeActions={hideNodeActions}
highlightedAttributes={getHighlightedSpanAttributes({
attributes: span.data,
spanId: span.span_id,
})}

static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/highlights.tsx#L90-L94

hideNodeActions={props.hideNodeActions}
highlightedAttributes={getHighlightedSpanAttributes({
attributes: props.event.contexts.trace?.data,
spanId: props.node.value.span_id,
})}

Fix in Cursor Fix in Web


Copy link
Copy Markdown
Member

@ArthurKnaus ArthurKnaus left a comment

Choose a reason for hiding this comment

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

🚀

obostjancic and others added 3 commits December 11, 2025 10:03
Co-authored-by: ArthurKnaus <arthur.knaus@sentry.io>
Co-authored-by: ArthurKnaus <arthur.knaus@sentry.io>
Co-authored-by: ArthurKnaus <arthur.knaus@sentry.io>
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #104673   +/-   ##
========================================
  Coverage   80.53%    80.53%           
========================================
  Files        9334      9334           
  Lines      401102    401063   -39     
  Branches    25743     25735    -8     
========================================
- Hits       323008    322990   -18     
+ Misses      77652     77631   -21     
  Partials      442       442           

@obostjancic obostjancic merged commit 6e08794 into master Dec 11, 2025
49 checks passed
@obostjancic obostjancic deleted the ogi/tet-1527-update-product-logic-to-use-gen_aioperationname branch December 11, 2025 13:13
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants