RUM-3669 avoid feature flag spamming events#1932
Merged
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## release/2.7.0 #1932 +/- ##
=================================================
- Coverage 83.56% 83.36% -0.20%
=================================================
Files 481 481
Lines 17413 17425 +12
Branches 2590 2595 +5
=================================================
- Hits 14550 14526 -24
- Misses 2177 2186 +9
- Partials 686 713 +27
|
0xnm
previously approved these changes
Mar 22, 2024
0xnm
left a comment
Member
There was a problem hiding this comment.
I'm ok with the change, we just need to define its shape in terms of the pubilc API and align with iOS, I left an idea regarding that.
ncreated
previously approved these changes
Mar 22, 2024
ncreated
left a comment
Member
There was a problem hiding this comment.
Looks good 👍. Minor suggestion on API naming, non-blocking.
0xnm
previously approved these changes
Mar 22, 2024
0xnm
approved these changes
Mar 22, 2024
0xnm
left a comment
Member
There was a problem hiding this comment.
lgtm. regarding the release, I think we will need to release 2.8.0 with buildId support soon (maybe in 2 weeks?), so maybe this change can be shipped there instead of hotfix.
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?
This PR attempts to improve the performance linked to setting FeatureFlag evaluations on a RUM View. Namely:
addFeatureFlagBatchEvaluation()method allowing to send a batch of feature flags instead of sending them once at a time. This limits the number of event the Rum View Scope has to process, and the number of view updates written on disk.RumViewScopehandling the feature flags updates: instead of writing an event update for every call to theaddFeatureFlagEvaluation()andaddFeatureFlagBatchEvaluation()methods, it only writes an event if at least one feature flag value was changed.Motivation
For some customer updating many feature flags at once, that would result in a lot of RawRumEvents being processed, and a lot of RUM View updates being written on disk. In some extreme cases it could lead to a lot of backpressure on the executor queues.