feat(names): Add span name and description conventions for ui.* ops - #643
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Internal Changes 🔧Deps
🤖 This preview updates automatically when you update the PR. |
ui.* ops
49d9b26 to
83580f6
Compare
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>
83580f6 to
25043f9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
| "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}}"], |
There was a problem hiding this comment.
CLS template cannot resolve source
Medium Severity
The layout shift description template uses {{browser.web_vital.cls.source.<key>}}, 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.
Reviewed by Cursor Bugbot for commit 25043f9. Configure here.
…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>


Adds span name and description rules for
uispans (component lifecycle, long/blocking tasks, LCP, CLS, INP, interaction spans), and fills in the op descriptions that were still missing inmodel/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>, andbrowser.web_vital.inp.target(from #641).