Skip to content

RUMM-2421 Processor - process FullSnapshotRecords and dispatch to persister#1013

Merged
mariusc83 merged 1 commit into
feature/session-replay-vofrom
mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords
Aug 31, 2022
Merged

RUMM-2421 Processor - process FullSnapshotRecords and dispatch to persister#1013
mariusc83 merged 1 commit into
feature/session-replay-vofrom
mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords

Conversation

@mariusc83

@mariusc83 mariusc83 commented Aug 16, 2022

Copy link
Copy Markdown
Member

What does this PR do?

A brief description of the change being made with this pull request.

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)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@mariusc83 mariusc83 self-assigned this Aug 16, 2022
@xgouchet xgouchet added the size-large This PR is large sized label Aug 16, 2022
@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords branch 4 times, most recently from ef329bc to d3a7eaf Compare August 16, 2022 13:24
@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2385/session-replay-record-screen-interactions-as-touch-data branch from 13a90bc to af0db01 Compare August 17, 2022 08:46
Base automatically changed from mconstantin/rumm-2385/session-replay-record-screen-interactions-as-touch-data to feature/session-replay-vo August 17, 2022 09:09
@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords branch from d3a7eaf to 82339be Compare August 17, 2022 09:25
@mariusc83
mariusc83 marked this pull request as ready for review August 17, 2022 11:15
@mariusc83
mariusc83 requested a review from a team as a code owner August 17, 2022 11:15

@0xnm 0xnm 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.

I've left some minor suggestions/questions, but overall looks good!

Comment thread detekt.yml Outdated
var fakeSnapshot = forge.aSnapshot(1)
val invalidWidthWireframe: MobileSegment.Wireframe = if (forge.aBool()) {
forge.getForgery<MobileSegment.Wireframe.ShapeWireframe>()
.copy(width = forge.aLong(max = 0))

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.

max is exclusive, so if we want to cover cases where width == 0 as in the code, we need to use max = 1. Same for the else block below.

@codecov-commenter

codecov-commenter commented Aug 31, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1013 (82339be) into feature/session-replay-vo (922fd29) will increase coverage by 0.10%.
The diff coverage is 85.14%.

❗ Current head 82339be differs from pull request most recent head 9b00bed. Consider uploading reports for the commit 9b00bed to get more accurate results

@@                      Coverage Diff                      @@
##           feature/session-replay-vo    #1013      +/-   ##
=============================================================
+ Coverage                      82.99%   83.09%   +0.10%     
=============================================================
  Files                            307      320      +13     
  Lines                           9980    10296     +316     
  Branches                        1628     1697      +69     
=============================================================
+ Hits                            8282     8555     +273     
- Misses                          1193     1207      +14     
- Partials                         505      534      +29     
Impacted Files Coverage Δ
...nal/tracking/AndroidXFragmentLifecycleCallbacks.kt 93.48% <ø> (ø)
...m/datadog/android/sessionreplay/recorder/IntExt.kt 100.00% <ø> (ø)
.../android/sessionreplay/processor/EnrichedRecord.kt 35.29% <35.29%> (ø)
...com/datadog/android/sessionreplay/recorder/Node.kt 66.67% <66.67%> (+66.67%) ⬆️
...ionreplay/recorder/mapper/ButtonWireframeMapper.kt 66.67% <66.67%> (ø)
...oid/sessionreplay/utils/SessionReplayRumContext.kt 66.67% <66.67%> (ø)
...android/sessionreplay/recorder/SnapshotProducer.kt 77.14% <77.14%> (+27.14%) ⬆️
...y/recorder/mapper/ViewScreenshotWireframeMapper.kt 80.00% <80.00%> (ø)
...onreplay/recorder/mapper/GenericWireframeMapper.kt 85.71% <85.71%> (ø)
...droid/sessionreplay/processor/SnapshotProcessor.kt 87.69% <87.69%> (-12.31%) ⬇️
... and 16 more

@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords branch 2 times, most recently from d347772 to 9b00bed Compare August 31, 2022 09:29
@mariusc83
mariusc83 requested a review from 0xnm August 31, 2022 09:41

@0xnm 0xnm 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.

I've left few comments, but overall lgtm!

Comment thread detekt.yml
Comment on lines 898 to +904
- "java.util.LinkedList.poll()"
- "java.util.LinkedList.addAll(kotlin.collections.Collection)"
- "java.util.LinkedHashMap.remove(kotlin.String)"
- "java.util.Stack.constructor()"
- "java.util.Stack.push(com.datadog.android.sessionreplay.recorder.Node)"
- "java.util.Stack.isNotEmpty()"
- "java.util.Stack.pop()"
- "java.util.Stack.push(com.datadog.android.sessionreplay.recorder.Node)"

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.

minor: better to arrange those in alphabetical order as well

forge.aStringMatching("#[0-9A-F]{6}FF")
},
opacity = forge.aFloat(min = 0f, max = 1f),
cornerRadius = forge.aLong()

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.

why here we use forge.aLong(), but in TextWireframeForgeryFactory it is forge.anInt(min = 0) for the similar argument?

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.

you're right, I will fix those.

},
textStyle = MobileSegment.TextStyle(
family = forge.aString(),
size = forge.aLong(min = 0),

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.

btw, it seems there is aPositiveLong method

@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords branch from 9b00bed to e82ac59 Compare August 31, 2022 11:58
@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords branch from e82ac59 to bbbc4e6 Compare August 31, 2022 12:33
@mariusc83
mariusc83 merged commit a4f6e93 into feature/session-replay-vo Aug 31, 2022
@mariusc83
mariusc83 deleted the mconstantin/rumm-2421/process-snapshots-as-fullsnapshotrecords branch August 31, 2022 12:54
@xgouchet xgouchet added this to the internal milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-large This PR is large sized

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants