RUM-6394: Changing logApiUsage method signature - making event parameter computation lazy#2433
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2433 +/- ##
===========================================
- Coverage 70.14% 70.10% -0.04%
===========================================
Files 769 769
Lines 28508 28510 +2
Branches 4777 4777
===========================================
- Hits 19996 19986 -10
- Misses 7176 7188 +12
Partials 1336 1336
|
…ter computation lazy
satween
force-pushed
the
tvaleev/rum-6394/lazy_metrics
branch
from
December 5, 2024 15:55
6609ef8 to
da8d6e7
Compare
satween
marked this pull request as ready for review
December 5, 2024 15:55
ambushwork
approved these changes
Dec 5, 2024
ambushwork
left a comment
Member
There was a problem hiding this comment.
Pipeline to fix, otherwise LGTM!
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?
Changing signature of
logApiUsagemethod ofInternalLoggera bit - replacingInternalTelemetryEvent.ApiUsageevent parameter with lambda function that will called only if sampling happens. This should reduce useless amount of work made by sdk and reduce impact to the customer's application resources consumptionMotivation
Some times running
logApiUsageis useless because actual logging wont happened because it not sampled. But in such cases parameter computation still happened so we will waste device's resources for the useless work. To avoid that we use lambda insteadWhat inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)