feat(ember): Extract ember-specific logic into custom browserTracingIntegration#20702
Open
feat(ember): Extract ember-specific logic into custom browserTracingIntegration#20702
browserTracingIntegration#20702Conversation
Contributor
size-limit report 📦
|
705bcf0 to
bc9ce81
Compare
mydea
commented
May 6, 2026
mydea
commented
May 6, 2026
| afterAllSetup(client: BrowserClient) { | ||
| integration.afterAllSetup(client); | ||
|
|
||
| // Run this in the next tick to ensure the ember router etc. is properly initialized |
Member
Author
There was a problem hiding this comment.
without this, the pageload instrumentation does not work. it seems that router.location is not properly resolved/available yet at this time. probably some timing issue. this was not a problem before because we had an await import before this which lead to no timing issues in that case.
3 tasks
make it work with legacy stuff... move stuff around and fix it WIP move stuff around... fix where stuff lives
14cb4fa to
39a52a7
Compare
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.
Kind of extracted/inspired by #19229, this refactors the ember logic for performance monitoring to use the more general pattern we already have in our code, delegating this fully into an ember-specific
browserTracingIntegration.For now, this should not be breaking, as the auto-wiring etc. remains the same - it just uses this integration under the hood instead of manually calling stuff etc.
In a follow up, this should make it much easier to use this in a more standalone fashion in the v2 addon.
I've split the logic into separate files as this was all a bit convoluted together, hopefully this makes it a bit easier to follow what belongs where etc.
This also generally aligns the ember package more with our own broader way of handling things, which is also nice IMHO. If you add the integration, you get everything set up, and if not, not - easy! :D
Status quo
This is still being added automatically - this is what
instance-initializers/sentry-performance.tsdoes. that auto-runs and adds the browser tracing integration so it has access to the ember app instance, which we need to setup tracing stuff properly.Future (v11)
We'll no longer have the auto instance-initializer, but instead users will have to manually add this. but this can be simplified then in their app code to: