feat(op): Add ui.resolve span op - #633
Merged
Merged
Conversation
Component resolution is currently homeless. Frameworks that map a component name to an implementation at render time (Ember/Glimmer, Vue's `resolveComponent`, Angular's dynamic components) have no op that describes that step, so SDKs either force it onto `ui.render` -- where it collides with the render span it precedes, same name and same `ui.component_name` -- or onto `function`, which infers a description of "Function execution". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Cut it to what a reader needs: what the op covers, and that the render is a separate span. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lms24
marked this pull request as ready for review
September 9, 2026 20:08
Lms24
requested review from
a team,
cleptric,
mjq and
nsdeschenes
as code owners
September 9, 2026 20:08
Lms24
added a commit
to getsentry/sentry-javascript
that referenced
this pull request
Sep 11, 2026
Ember spans that resolve a component definition were using the `function` op, which infers a span description of "Function execution" and loses the component name. They now use `ui.resolve`, a new op proposed in getsentry/sentry-conventions#633. The op is hard-coded with a TODO until that lands and we can import the const. Route hook spans keep the route as `sentry.description` and are named after the hook when span streaming is on, so the name matches `code.function.name` (the `function` op's name template) in both trace lifecycles. Also converts the `ember-classic` E2E app to span streaming and turns on `enableComponentDefinitions` there, so `ui.resolve` gets covered. That flag was off in every app, so the code path had never run in CI. `ember-embroider` and `ember-vite` still cover the static lifecycle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
nsdeschenes
approved these changes
Sep 11, 2026
Lms24
enabled auto-merge (squash)
September 11, 2026 12:34
Lms24
added a commit
to getsentry/sentry-javascript
that referenced
this pull request
Sep 11, 2026
Ember spans that resolve a component definition were using the `function` op, which infers a span description of "Function execution" and loses the component name. They now use `ui.resolve`, a new op proposed in getsentry/sentry-conventions#633. The op is hard-coded with a TODO until that lands and we can import the const. Route hook spans keep the route as `sentry.description` and are named after the hook when span streaming is on, so the name matches `code.function.name` (the `function` op's name template) in both trace lifecycles. Also converts the `ember-classic` E2E app to span streaming and turns on `enableComponentDefinitions` there, so `ui.resolve` gets covered. That flag was off in every app, so the code path had never run in CI. `ember-embroider` and `ember-vite` still cover the static lifecycle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
pushed a commit
to getsentry/sentry-javascript
that referenced
this pull request
Sep 15, 2026
Ember spans that resolve a component definition were using the `function` op, which infers a span description of "Function execution" and loses the component name. They now use `ui.resolve`, a new op proposed in getsentry/sentry-conventions#633. The op is hard-coded with a TODO until that lands and we can import the const. Route hook spans keep the route as `sentry.description` and are named after the hook when span streaming is on, so the name matches `code.function.name` (the `function` op's name template) in both trace lifecycles. Also converts the `ember-classic` E2E app to span streaming and turns on `enableComponentDefinitions` there, so `ui.resolve` gets covered. That flag was off in every app, so the code path had never run in CI. `ember-embroider` and `ember-vite` still cover the static lifecycle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
pushed a commit
to getsentry/sentry-javascript
that referenced
this pull request
Sep 15, 2026
) Ember spans that resolve a component definition used the `function` op, which infers a description of "Function execution" and loses the component name. Switching them to `ui.render` would have collided with the render span that follows it: same name, same `ui.component_name`. So they now use `ui.resolve`, a new op proposed in getsentry/sentry-conventions#633. It is hard-coded with a TODO until that lands and we can import the const. This PR: - gives component definition lookups the `ui.resolve` op, in both trace lifecycles — unlike names, ops are not gated on span streaming - names route hook spans after the hook (`beforeModel`, `model`, …) when span streaming is enabled, which is the `function` op's `{{code.function.name}}` name template - keeps the route on `sentry.description`, but only when streaming: in the static lifecycle the span name is still the route, so the attribute would just duplicate it. Same call `@sentry/angular`'s `TraceMethod` makes. - turns on `enableComponentDefinitions` in the `ember-classic` E2E app, which is what covers `ui.resolve` — the flag was off in every app, so the code path had never run in CI - documents both changes in `MIGRATION.md` ref #23954 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
ui.resolveop for looking up which component a name in a template refers to, before that component renders.Ember does this for every component and the SDK instruments it, but there is no op that fits.
functiongives the span a description of "Function execution" and drops the component name.ui.rendercollides with the render span that follows it: same name, sameui.component_name, no way to tell them apart. This is the same layer where the other component phases already live (ui.mount/ui.render/ui.update/ui.unmount).