Skip to content

RUMM-2602: Use event write context in RUM#1117

Merged
0xnm merged 1 commit into
feature/sdkv2from
nogorodnikov/rumm-2602/use-event-write-context-for-rum
Nov 2, 2022
Merged

RUMM-2602: Use event write context in RUM#1117
0xnm merged 1 commit into
feature/sdkv2from
nogorodnikov/rumm-2602/use-event-write-context-for-rum

Conversation

@0xnm

@0xnm 0xnm commented Oct 31, 2022

Copy link
Copy Markdown
Member

What does this PR do?

This change brings the usage of event write context (EWC) to RUM (and to Web View RUM) and is similar to the move done in #1106, #1103.

Basically to write RUM events we now first request EWC via FeatureScope#withWriteContext call. This call is done at the very last point, so that the switch to the worker thread (where the closure is executed) doesn't affect the sequential flow and no changes to the shared state is done from the closure context.

There are some things which still keep RUM bound to the crash reporting or to the core feature (like the need to get server time offset outside of EWC, etc.), they will be addressed in the other PRs.

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)

@0xnm
0xnm force-pushed the nogorodnikov/rumm-2602/use-event-write-context-for-rum branch from edd4839 to d71fe7b Compare October 31, 2022 17:05
@xgouchet xgouchet added the size-large This PR is large sized label Oct 31, 2022
@0xnm
0xnm marked this pull request as ready for review November 2, 2022 07:40
@0xnm
0xnm requested a review from a team as a code owner November 2, 2022 07:40

@mariusc83 mariusc83 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.

LGTM

@codecov-commenter

codecov-commenter commented Nov 2, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1117 (d71fe7b) into feature/sdkv2 (4317825) will increase coverage by 0.17%.
The diff coverage is 95.09%.

@@                Coverage Diff                @@
##           feature/sdkv2    #1117      +/-   ##
=================================================
+ Coverage          82.32%   82.49%   +0.17%     
=================================================
  Files                352      348       -4     
  Lines              11426    11409      -17     
  Branches            1898     1910      +12     
=================================================
+ Hits                9406     9411       +5     
+ Misses              1442     1421      -21     
+ Partials             578      577       -1     
Impacted Files Coverage Δ
.../android/error/internal/DatadogExceptionHandler.kt 81.08% <ø> (ø)
...id/webview/internal/rum/WebViewRumEventConsumer.kt 76.09% <75.00%> (-0.66%) ⬇️
...tadog/android/rum/internal/domain/RumDataWriter.kt 84.38% <87.50%> (-1.34%) ⬇️
...ndroid/telemetry/internal/TelemetryEventHandler.kt 90.91% <93.33%> (-1.15%) ⬇️
.../android/rum/internal/domain/scope/RumViewScope.kt 96.45% <93.91%> (-0.53%) ⬇️
...ndroid/rum/internal/domain/scope/RumActionScope.kt 98.58% <96.00%> (-0.70%) ⬇️
...roid/rum/internal/domain/scope/RumResourceScope.kt 97.06% <96.23%> (-0.95%) ⬇️
.../main/kotlin/com/datadog/android/rum/RumMonitor.kt 78.00% <100.00%> (+0.45%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 93.00% <100.00%> (-0.07%) ⬇️
...d/rum/internal/domain/scope/RumApplicationScope.kt 100.00% <100.00%> (ø)
... and 20 more

@0xnm
0xnm merged commit 49964ea into feature/sdkv2 Nov 2, 2022
@0xnm
0xnm deleted the nogorodnikov/rumm-2602/use-event-write-context-for-rum branch November 2, 2022 10:52
@xgouchet xgouchet added this to the 1.16.0 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