Skip to content

feat(ember)!: Use function and ui.task span ops for route hooks and runloop - #22669

Merged
msonnb merged 7 commits into
developfrom
ms/js-3105-ember-route-hooks
Jul 31, 2026
Merged

feat(ember)!: Use function and ui.task span ops for route hooks and runloop#22669
msonnb merged 7 commits into
developfrom
ms/js-3105-ember-route-hooks

Conversation

@msonnb

@msonnb msonnb commented Jul 27, 2026

Copy link
Copy Markdown
Member

Three Ember op cleanups:

  • Route hook spans from instrumentRoutePerformance use function instead of ui.ember.route.<hook>. The hook name is preserved in code.function.name and ember.route.hook.
  • Runloop spans use ui.task instead of ui.ember.runloop.<queue>. The queue is preserved in ember.runloop.queue. Ember allows custom queues, so the suffix was unbounded.
  • Component renders use ui.render, component definition lookups use function, and the initial load uses ui.mount. Both component spans set ui.component_name.

Since spans that used to be distinguished by op suffix now share one op, the test helpers and E2E span finders identify them by attribute instead.

Note ui.mount is not in the conventions registry yet, so it is a literal with a TODO to swap in the constant once registered.

Part of #22446

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

JS-3105

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.82 kB - -
@sentry/browser - with treeshaking flags 28.02 kB - -
@sentry/browser (incl. Tracing) 47.08 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.09 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.82 kB - -
@sentry/browser (incl. Tracing, Replay) 86.39 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.83 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.11 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.76 kB - -
@sentry/browser (incl. Feedback) 47.13 kB - -
@sentry/browser (incl. sendFeedback) 34.66 kB - -
@sentry/browser (incl. FeedbackAsync) 39.76 kB - -
@sentry/browser (incl. Metrics) 30.89 kB - -
@sentry/browser (incl. Logs) 31.12 kB - -
@sentry/browser (incl. Metrics & Logs) 31.8 kB - -
@sentry/react 31.6 kB - -
@sentry/react (incl. Tracing) 49.33 kB - -
@sentry/vue 34.74 kB - -
@sentry/vue (incl. Tracing) 49.05 kB - -
@sentry/svelte 29.85 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 47.45 kB - -
CDN Bundle (incl. Logs, Metrics) 33.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.78 kB - -
CDN Bundle (incl. Tracing, Replay) 85.08 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.85 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.16 kB - -
CDN Bundle - uncompressed 95.04 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.27 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.25 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.51 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.52 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.49 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.18 kB - -
@sentry/nextjs (client) 51.92 kB - -
@sentry/sveltekit (client) 47.51 kB - -
@sentry/core/server 79.59 kB - -
@sentry/core/browser 51.58 kB - -
@sentry/node 121.27 kB +0.01% +1 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 84.77 kB +0.01% +1 B 🔺
@sentry/aws-serverless 93.02 kB - -
@sentry/cloudflare (withSentry) - minified 197.59 kB - -
@sentry/cloudflare (withSentry) 485.77 kB - -

View base workflow run

@msonnb msonnb changed the title feat(ember)!: Use function span op for route hooks feat(ember)!: Use function and ui.task span ops for route hooks and runloop Jul 27, 2026
@msonnb
msonnb force-pushed the ms/js-3105-angular-ops branch from de8350a to 7ac0b5d Compare July 27, 2026 11:44
@msonnb
msonnb force-pushed the ms/js-3105-ember-route-hooks branch from 915c173 to 62b0ee0 Compare July 27, 2026 11:44
@msonnb
msonnb force-pushed the ms/js-3105-angular-ops branch from 7ac0b5d to 6c7646e Compare July 27, 2026 12:10
@msonnb
msonnb force-pushed the ms/js-3105-ember-route-hooks branch from e55c2e0 to 7ae594a Compare July 27, 2026 12:10
@msonnb
msonnb changed the base branch from ms/js-3105-angular-ops to develop July 27, 2026 13:09
@msonnb
msonnb force-pushed the ms/js-3105-ember-route-hooks branch from 7ae594a to f9dc60e Compare July 27, 2026 13:51
msonnb and others added 5 commits July 28, 2026 15:51
Route hooks are functions, not their own op category. The hook name
moves to `code.function.name` and `ember.route.hook`.

Ref: JS-3105

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Match the `function` op and the new `code.function.name` /
`ember.route.hook` attributes. Span finders discriminate on the hook
name, since all hooks now share one op.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Queue values are phase detail, and Ember allows custom queues. The queue
moves to the `ember.runloop.queue` attribute.

Ref: JS-3105

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Component renders use `ui.render`, component definition lookups use
`function`, and the initial load uses `ui.mount`. Both component spans
set `ui.component_name`.

Ref: JS-3105

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@msonnb
msonnb force-pushed the ms/js-3105-ember-route-hooks branch from f9dc60e to d9b3e6c Compare July 28, 2026 13:52
@msonnb
msonnb marked this pull request as ready for review July 28, 2026 14:45
@msonnb
msonnb requested a review from a team as a code owner July 28, 2026 14:45
@msonnb
msonnb requested review from nicohrubec and s1gr1d and removed request for a team July 28, 2026 14:46

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall lgtm, just two questions about conventions

attributes: {
[SENTRY_OP]: BROWSER_UI_TASK_SPAN_OP,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.ember',
'ember.runloop.queue': queue,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

m: does ember.runloop.queue also need to be added to @sentry/conventions?

@msonnb msonnb Jul 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure whether we want to add library-specific attributes to conventions (I don't think so). If yes we'll probably wanna add it to #18895.
cc @Lms24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does ember.runloop.queue also need to be added to @sentry/conventions

yes, all attributes sent from our SDKs should be in conventions

I'm not sure whether we want to add library-specific attributes to conventions

we should always use a more generic attribute if possible that isn't tied to a specific lib or framework. I'm not sure if there's a specific replacement for ember.runloop.queue. If there's none, we can add an ember-specific attribute. There's precedence for framework-specific attributes, for example, Remix.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i'm not really familiar with ember but from a quick search i couldn't find any fitting generic attribute and from this guide it looks like the run queue is a pretty specific/unique concept, so yes we should probably add this ember-specific attribute to conventions then.

Comment thread packages/ember/addon/index.ts Outdated
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.ember',
[SENTRY_OP]: GENERAL_FUNCTION_SPAN_OP,
[CODE_FUNCTION_NAME]: hookName,
'ember.route.hook': hookName,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

m: same for ember.route.hook

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need ember.route.hook at all? seems like this is already covered with the general code.function.name attribute 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

true, same value twice seems redundant. I think we can remove it 👍

@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 63b4326. Configure here.

attributes: {
[SENTRY_OP]: op,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.ember',
[UI_COMPONENT_NAME]: 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.

New attribute lacks test coverage

Low Severity

Newly added ui.component_name on Ember component spans is never asserted. Acceptance checks only match op | description, so a regression that drops the attribute would still pass. Per the testing conventions rule, newly added payload data needs thorough assertions.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 63b4326. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

👋 @s1gr1d — Please review this PR when you get a chance!

@msonnb
msonnb merged commit 09d25b4 into develop Jul 31, 2026
271 checks passed
@msonnb
msonnb deleted the ms/js-3105-ember-route-hooks branch July 31, 2026 14:27
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