Skip to content

feat(op): Add ui.resolve span op - #633

Merged
Lms24 merged 3 commits into
mainfrom
feat/ui-resolve-op
Sep 11, 2026
Merged

Lms24 merged 3 commits into
mainfrom
feat/ui-resolve-op

Conversation

@Lms24

@Lms24 Lms24 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Adds a ui.resolve op 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. function gives the span a description of "Function execution" and drops the component name. ui.render collides with the render span that follows it: same name, same ui.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).

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>
@github-actions

github-actions Bot commented Sep 9, 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 ✨

  • (op) Add ui.resolve span op by Lms24 in #633

Internal Changes 🔧

  • (deps) Bump smol-toml from 1.6.1 to 1.8.0 by dependabot in #635

🤖 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 Lms24 self-assigned this Sep 9, 2026
@Lms24
Lms24 marked this pull request as ready for review September 9, 2026 20:08
@Lms24
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>
@Lms24
Lms24 enabled auto-merge (squash) September 11, 2026 12:34
@Lms24
Lms24 merged commit b0b95df into main Sep 11, 2026
17 checks passed
@Lms24
Lms24 deleted the feat/ui-resolve-op branch September 11, 2026 12:36
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>
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.

2 participants