-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ [RUMF-530][RUM] allow using RUM API before init #551
✨ [RUMF-530][RUM] allow using RUM API before init #551
Conversation
Codecov Report
@@ Coverage Diff @@
## master #551 +/- ##
==========================================
- Coverage 89.66% 88.11% -1.56%
==========================================
Files 38 38
Lines 2265 2255 -10
Branches 473 474 +1
==========================================
- Hits 2031 1987 -44
- Misses 234 268 +34
Continue to review full report at Codecov.
|
packages/rum/src/rum.entry.ts
Outdated
context: combine({}, context), | ||
globalContext: combine({}, globalContextManager.get()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe having a cloneDeep
(lodash style) method would be more explicit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR: I'll do this in a separate PR as it has other implications (combine
does not perform a deep clone at the moment)
Codecov Report
@@ Coverage Diff @@
## master #551 +/- ##
==========================================
- Coverage 89.31% 88.52% -0.79%
==========================================
Files 38 39 +1
Lines 2265 2258 -7
Branches 473 474 +1
==========================================
- Hits 2023 1999 -24
- Misses 242 259 +17
Continue to review full report at Codecov.
|
Motivation
We want to allow using RUM APIs before initialising the SDK. (see #545 for the Logs side)
Changes
getInternalContext
returnundefined
before initTesting
Unit tests have been updated. Manual testing can be done by running some
DD_RUM.addUserAction('foo')
orDD_RUM.getInternalContext()
beforeDD_RUM.init()
.I have gone over the contributing documentation.