Repository navigation
🐛 Stop retaining Angular views and errors queued before RUM starts - #5237
Conversation
…tore only view name instead of the whole root
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: dd040d3 | Docs | View more details | Give us feedback! |
|
@codex pls review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8b07df43a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Repeated pre-start initialization now causes duplicate view tracking. Error context getters can also throw outside monitoring and prevent Angular’s default error reporting.
🤖 Bits Code Review · Commit e8b07df
- addAngularError: read dd_context inside callMonitored so a throwing getter can't escape the Angular error handler - angularPlugin: unsubscribe the previous view observer when onInit runs again, so retried inits don't start each view several times
rgaignault
left a comment
There was a problem hiding this comment.
Seems like there is a missing file test, mentioned in the description ? provideDatadogRouter.spec.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd040d3c0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Motivation
Addresses #5193. With
provideDatadogRouter()orprovideDatadogErrorHandler(), Angular SSR servers leak memory on every render.Two causes:
root), which keeps the rendered app alive.Changes
BufferedObservable, as the core pre-start buffer does, capped at the same 500 entries. Buffers are released ononInit/onRumStart.{ name, url }(the name is computed when the navigation happens), errors store theaddErrorpayload.Test instructions
yarn test:unit --spec 'packages/browser-rum-angular/**/*.spec.ts'provideDatadogRouter.spec.tschecks with aWeakRef+gc()that a route snapshot is collected when RUM isn't initialized. It fails without the fix. Karma's Chrome now runs with--js-flags=--expose-gc; the test is pending wheregc()isn't available (BrowserStack).Checklist