Skip to content

RUM-2568: Better handling of event write errors in RUM#1766

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/handle-event-write-errors-in-rum
Dec 21, 2023
Merged

RUM-2568: Better handling of event write errors in RUM#1766
0xnm merged 1 commit into
developfrom
nogorodnikov/handle-event-write-errors-in-rum

Conversation

@0xnm

@0xnm 0xnm commented Dec 14, 2023

Copy link
Copy Markdown
Member

What does this PR do?

This PR improves any error handling in the write pipeline of RUM. Before, if there was any exception thrown inside writing pipeline which wasn't caught, or if write wasn't successful, we didn't notify that event wasn't written (or dropped, in other words). This prevented to decrease pendingXXX counters in RumViewScope, thus making isComplete to evaluate to false in such cases.

This PR also centralizes the place where the notification about write success or failure is sent.

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)

@codecov-commenter

codecov-commenter commented Dec 19, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.93246% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.68%. Comparing base (3947313) to head (54d41c6).
⚠️ Report is 1924 commits behind head on develop.

Files with missing lines Patch % Lines
.../android/rum/internal/domain/scope/RumViewScope.kt 88.97% 4 Missing and 28 partials ⚠️
...roid/rum/internal/domain/scope/RumResourceScope.kt 94.81% 2 Missing and 5 partials ⚠️
...ndroid/rum/internal/domain/scope/RumActionScope.kt 95.52% 1 Missing and 2 partials ⚠️
...kotlin/com/datadog/android/rum/utils/SdkCoreExt.kt 97.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1766   +/-   ##
========================================
  Coverage    83.68%   83.68%           
========================================
  Files          465      466    +1     
  Lines        16336    16364   +28     
  Branches      2454     2452    -2     
========================================
+ Hits         13670    13694   +24     
  Misses        2017     2017           
- Partials       649      653    +4     
Files with missing lines Coverage Δ
...lin/com/datadog/android/rum/internal/RumFeature.kt 93.49% <ø> (+0.63%) ⬆️
...tadog/android/rum/internal/domain/RumDataWriter.kt 100.00% <100.00%> (+7.14%) ⬆️
...ndroid/rum/internal/domain/event/RumEventMapper.kt 100.00% <100.00%> (+4.62%) ⬆️
...kotlin/com/datadog/android/rum/utils/SdkCoreExt.kt 97.44% <97.44%> (ø)
...ndroid/rum/internal/domain/scope/RumActionScope.kt 97.18% <95.52%> (+0.66%) ⬆️
...roid/rum/internal/domain/scope/RumResourceScope.kt 95.17% <94.81%> (+0.49%) ⬆️
.../android/rum/internal/domain/scope/RumViewScope.kt 93.76% <88.97%> (-0.38%) ⬇️

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0xnm
0xnm force-pushed the nogorodnikov/handle-event-write-errors-in-rum branch from 3501939 to f04c90a Compare December 19, 2023 17:24
@0xnm
0xnm changed the base branch from develop to nogorodnikov/rum-2566/convert-pending-resource-to-pending-error-when-resource-completes-with-an-error December 19, 2023 17:24
@0xnm 0xnm changed the title Better handling of event write errors in RUM RUM-2568: Better handling of event write errors in RUM Dec 19, 2023
Base automatically changed from nogorodnikov/rum-2566/convert-pending-resource-to-pending-error-when-resource-completes-with-an-error to develop December 20, 2023 11:03
@0xnm
0xnm force-pushed the nogorodnikov/handle-event-write-errors-in-rum branch 3 times, most recently from f04c90a to 54d41c6 Compare December 20, 2023 16:05
@0xnm
0xnm marked this pull request as ready for review December 20, 2023 16:07
@0xnm
0xnm requested review from a team as code owners December 20, 2023 16:07

@xgouchet xgouchet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceliy done !

@0xnm
0xnm merged commit 2c6f05b into develop Dec 21, 2023
@0xnm
0xnm deleted the nogorodnikov/handle-event-write-errors-in-rum branch December 21, 2023 12:59
@xgouchet xgouchet added this to the 2.5.0 milestone Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants