RUM-10770: Remove KeepAlive event in RUM#3079
Conversation
This comment has been minimized.
This comment has been minimized.
b9e9c18 to
1b2198c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3079 +/- ##
===========================================
- Coverage 71.03% 70.97% -0.06%
===========================================
Files 912 912
Lines 33557 33543 -14
Branches 5642 5642
===========================================
- Hits 23836 23807 -29
- Misses 8154 8159 +5
- Partials 1567 1577 +10
🚀 New features to boost your workflow:
|
f3b731b to
0e4edd9
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
f37cdb1
0e4edd9 to
f37cdb1
Compare
f37cdb1 to
8765266
Compare
| if (type == RumViewType.BACKGROUND && | ||
| event is RumRawEvent.AddError && | ||
| event.isFatal || event is RumRawEvent.StartView | ||
| ) { |
There was a problem hiding this comment.
minor: it is worth to extract complex condition instead of suppressing a warning, because order of the validation here is not obvious(is it (a && b && c) || d or a && b && (c || d)?):
| if (type == RumViewType.BACKGROUND && | |
| event is RumRawEvent.AddError && | |
| event.isFatal || event is RumRawEvent.StartView | |
| ) { | |
| val isBackgroundFatalError = type == RumViewType.BACKGROUND && | |
| event is RumRawEvent.AddError && | |
| event.isFatal | |
| if (isBackgroundFatalError || event is RumRawEvent.StartView) { |
Also it is worth adding a test to verify that we indeed don't have logging/telemetry for such case
There was a problem hiding this comment.
moved part of the condition into a dedicated function
There was a problem hiding this comment.
a unit test is also added to verify that when the event type is a background fatal error, we don't send any telemetry for 1ns duration
5ec9ab7 to
a42dda9
Compare
5d56b82
a42dda9 to
5d56b82
Compare
What does this PR do?
Main changes for this PR:
KeepAliveinRumRawEventDatadogRumMonitorDue to the removal of
KeepAliveevent, there are some side-effect changes:RumViewScope.sendViewUpdatebecomesinternalsoRumViewManagerScopecan call it directly to update the view.startForegroundViewused to dispatch a keep alive to update the view, now we call sendViewUpdate directly for the same purposeKeepAliveevent to flush the Rum Event into the writer, now we use eitherStopViewto flush them, either we callsendViewUpdatedirectly fromRumViewManagerScopeMotivation
RUM-10770
Review checklist (to be filled by reviewers)