Skip to content

feat(names): Add span name and description conventions for ui.* ops - #643

Merged
Lms24 merged 3 commits into
mainfrom
feat/ui-span-names-and-descriptions
Sep 22, 2026
Merged

Lms24 merged 3 commits into
mainfrom
feat/ui-span-names-and-descriptions

Conversation

@Lms24

@Lms24 Lms24 commented Sep 22, 2026

Copy link
Copy Markdown
Member

Adds span name and description rules for ui spans (component lifecycle, long/blocking tasks, LCP, CLS, INP, interaction spans), and fills in the op descriptions that were still missing in model/op.

Names stay low cardinality — component name, or the route for ui.action. Descriptions carry the element, taken from the vital-specific attribute in each case: browser.web_vital.lcp.element, browser.web_vital.cls.source.<key>, and browser.web_vital.inp.target (from #641).

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add the INP target and interaction type attributes by logaretm in #641
  • Deprecate the web vital report event attributes by logaretm in #642
  • Add React Native native module call attributes by alwx in #564
  • Use the web-vitals navigation types as-is for browser.navigation.type by logaretm in #640
  • Add legacy gen_ai cache token attributes (deprecated) by JPeer264 in #582

Other

  • (names) Add span name and description conventions for ui.* ops by Lms24 in #643
  • (op) Add ui.resolve span op by Lms24 in #633
  • (replays) Define replayId as a deprecated attribute by mjq in #401

Internal Changes 🔧

Deps

  • Bump devalue from 5.8.1 to 5.9.2 by dependabot in #639
  • Bump smol-toml from 1.6.1 to 1.8.0 by dependabot in #635

🤖 This preview updates automatically when you update the PR.

@Lms24 Lms24 changed the title feat(ui): Add span name and description conventions for ui.* ops feat(names): Add span name and description conventions for ui.* ops Sep 22, 2026
@Lms24 Lms24 self-assigned this Sep 22, 2026
@Lms24 Lms24 changed the title feat(names): Add span name and description conventions for ui.* ops feat(names): Add span name and description conventions for ui.* ops Sep 22, 2026
@Lms24
Lms24 marked this pull request as ready for review September 22, 2026 12:44
@Lms24
Lms24 requested review from a team, cleptric, mjq and nsdeschenes as code owners September 22, 2026 12:44
@Lms24
Lms24 requested a review from logaretm September 22, 2026 15:28
@Lms24
Lms24 force-pushed the feat/ui-span-names-and-descriptions branch from 49d9b26 to 83580f6 Compare September 22, 2026 16:59
Define name and description templates for the ui.* op family, and fill in
the op descriptions that were still missing in model/op.

Names stay low cardinality: component names for component ops, the route
for ui.action spans, and a literal fallback otherwise. Descriptions carry
the high cardinality element, taken from the vital-specific attribute for
each web vital - browser.web_vital.lcp.element for LCP,
browser.web_vital.cls.source.<key> for CLS, and browser.web_vital.inp.target
for the INP-measured ui.interaction.* ops.

Refs GH-641
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the feat/ui-span-names-and-descriptions branch from 83580f6 to 25043f9 Compare September 22, 2026 17:01

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 25043f9. Configure here.

Comment thread model/description/ui.json Outdated
"name": "Layout shift",
"brief": "A Cumulative Layout Shift (CLS) web vital measurement, described by the first of its layout shift sources.",
"ops": ["ui.webvital.cls"],
"templates": ["{{browser.web_vital.cls.source.<key>}}", "{{ui.component_name}}"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CLS template cannot resolve source

Medium Severity

The layout shift description template uses {{browser.web_vital.cls.source.&lt;key&gt;}}, but spans store numbered keys such as browser.web_vital.cls.source.1. Template evaluation looks up that literal attribute name, so this entry never matches and CLS descriptions fall through to ui.component_name, which these spans typically do not set.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 25043f9. Configure here.

Comment thread model/description/ui.json Outdated
Lms24 and others added 2 commits September 22, 2026 19:16
…ariant

A template sometimes needs one concrete value of an attribute with a dynamic
suffix rather than the whole set, e.g. browser.web_vital.cls.source.1 for the
first layout shift source. Such a key has no attribute file of its own, so the
template validation reported it as undefined.

Fall back to the <key> form of the last segment and accept it when that
attribute declares has_dynamic_suffix, so a suffixed variant of an ordinary
attribute is still rejected. Extract the check, which name and description
duplicated verbatim, into a shared helper.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 merged commit 3ca9664 into main Sep 22, 2026
17 checks passed
@Lms24
Lms24 deleted the feat/ui-span-names-and-descriptions branch September 22, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants