RUM-2572 WebView - force fullsnapshot in browser sdk when RUM native view changed#1807
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## feature/sr-web-view-support #1807 +/- ##
===============================================================
+ Coverage 83.66% 83.74% +0.07%
===============================================================
Files 471 472 +1
Lines 16497 16527 +30
Branches 2473 2478 +5
===============================================================
+ Hits 13802 13839 +37
+ Misses 2015 2010 -5
+ Partials 680 678 -2
|
0xnm
reviewed
Jan 4, 2024
mariusc83
force-pushed
the
mconstantin/rum-2572/force-browser-sdk-fullsnapsot-when-context-changed
branch
from
January 5, 2024 09:21
fd7fd93 to
b2c9544
Compare
0xnm
previously approved these changes
Jan 5, 2024
0xnm
left a comment
Member
There was a problem hiding this comment.
lgtm, I've added few suggestions
Comment on lines
+164
to
+167
| val cacheOverload = forge.anInt( | ||
| min = WebViewBrowserSnapshotHandler.DATA_CACHE_ENTRIES_LIMIT, | ||
| max = WebViewBrowserSnapshotHandler.DATA_CACHE_ENTRIES_LIMIT + 10 | ||
| ) |
Member
There was a problem hiding this comment.
broken formatting
Suggested change
| val cacheOverload = forge.anInt( | |
| min = WebViewBrowserSnapshotHandler.DATA_CACHE_ENTRIES_LIMIT, | |
| max = WebViewBrowserSnapshotHandler.DATA_CACHE_ENTRIES_LIMIT + 10 | |
| ) | |
| val cacheOverload = forge.anInt( | |
| min = WebViewBrowserSnapshotHandler.DATA_CACHE_ENTRIES_LIMIT, | |
| max = WebViewBrowserSnapshotHandler.DATA_CACHE_ENTRIES_LIMIT + 10 | |
| ) |
|
|
||
| @Test | ||
| fun `M purge the cached data W purgeWebViewFullSnapshotStateMap{cach limit was exceeded}`( | ||
| forge: Forge |
Member
There was a problem hiding this comment.
Suggested change
| forge: Forge | |
| forge: Forge |
0xnm
reviewed
Jan 5, 2024
| private fun purgeWebViewFullSnapshotStateMap() { | ||
| val iterator = webViewsFullSnapshotState.entries.iterator() | ||
| @Suppress("UnsafeThirdPartyFunctionCall") | ||
| // next/remove can't fail: we checked hasNext and there is not concurrent access |
Member
There was a problem hiding this comment.
Suggested change
| // next/remove can't fail: we checked hasNext and there is not concurrent access | |
| // next/remove can't fail: we checked hasNext and there is no concurrent access |
mariusc83
force-pushed
the
mconstantin/rum-2572/force-browser-sdk-fullsnapsot-when-context-changed
branch
3 times, most recently
from
January 5, 2024 10:30
874f865 to
8fe00af
Compare
0xnm
previously approved these changes
Jan 5, 2024
| } | ||
|
|
||
| @Test | ||
| fun `M purge the cached data W purgeWebViewFullSnapshotStateMap{cach limit was exceeded}`( |
Member
There was a problem hiding this comment.
Suggested change
| fun `M purge the cached data W purgeWebViewFullSnapshotStateMap{cach limit was exceeded}`( | |
| fun `M purge the cached data W purgeWebViewFullSnapshotStateMap{cache limit was exceeded}`( |
mariusc83
force-pushed
the
mconstantin/rum-2572/force-browser-sdk-fullsnapsot-when-context-changed
branch
from
January 5, 2024 12:30
8fe00af to
bd66167
Compare
0xnm
reviewed
Jan 5, 2024
| # SPDX License Names | ||
| [buildSrc/src/main/kotlin/com/datadog/gradle/plugin/checklicenses/SPDXLicense.kt] | ||
| ktlint_standard_enum-entry-name-case = disabled No newline at end of file | ||
| ktlint_standard_enum-entry-name-case = di sabled No newline at end of file |
Member
Author
There was a problem hiding this comment.
yes...it is al this problems with ktlint that I have to do it manually...I will work on that task right now to fix it in develop
Member
There was a problem hiding this comment.
ktlint shouldn't touch this file though
mariusc83
force-pushed
the
mconstantin/rum-2572/force-browser-sdk-fullsnapsot-when-context-changed
branch
from
January 5, 2024 12:45
bd66167 to
e699ced
Compare
0xnm
approved these changes
Jan 5, 2024
mariusc83
deleted the
mconstantin/rum-2572/force-browser-sdk-fullsnapsot-when-context-changed
branch
January 5, 2024 14:23
mariusc83
added a commit
that referenced
this pull request
Jan 15, 2024
…pshot-logic Revert "Merge pull request #1807 from DataDog/mconstantin/rum-2572/fo…
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.
What does this PR do?
Because the player always needs a fullsnapshot as a starting state to apply the mutations whenever it needs to play a RUM view event we need to make sure that for the
WebViewwe always force afullSnapshotRecordin the Datadog browser sdk that is tracking the loaded web page whenever the RUM view changes.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)