RUM-952 Provide the inBackground property for batch_delete metric#1588
Merged
mariusc83 merged 1 commit intoAug 25, 2023
Merged
Conversation
mariusc83
commented
Aug 25, 2023
| coreFeature.timeProvider | ||
| ).apply { | ||
| if (context is Application) { | ||
| context.registerActivityLifecycleCallbacks( |
Member
Author
There was a problem hiding this comment.
should we try to unregister this on stop ? Are we worried about leaks ?
0xnm
previously approved these changes
Aug 25, 2023
Comment on lines
+172
to
+189
| BatchMetricsDispatcher( | ||
| wrappedFeature.name, | ||
| dataUploadConfiguration, | ||
| filePersistenceConfig, | ||
| internalLogger, | ||
| coreFeature.timeProvider | ||
| ).apply { | ||
| if (context is Application) { | ||
| context.registerActivityLifecycleCallbacks( | ||
| ProcessLifecycleMonitor(this) | ||
| ) | ||
| } | ||
| metricsDispatcher = this | ||
| } |
Member
There was a problem hiding this comment.
apply already returns the instance.
Suggested change
| BatchMetricsDispatcher( | |
| wrappedFeature.name, | |
| dataUploadConfiguration, | |
| filePersistenceConfig, | |
| internalLogger, | |
| coreFeature.timeProvider | |
| ).apply { | |
| if (context is Application) { | |
| context.registerActivityLifecycleCallbacks( | |
| ProcessLifecycleMonitor(this) | |
| ) | |
| } | |
| metricsDispatcher = this | |
| } | |
| metricsDispatcher = BatchMetricsDispatcher( | |
| wrappedFeature.name, | |
| dataUploadConfiguration, | |
| filePersistenceConfig, | |
| internalLogger, | |
| coreFeature.timeProvider | |
| ).apply { | |
| if (context is Application) { | |
| context.registerActivityLifecycleCallbacks( | |
| ProcessLifecycleMonitor(this) | |
| ) | |
| } | |
| } |
| import java.util.concurrent.atomic.AtomicInteger | ||
|
|
||
| internal class ProcessLifecycleMonitor(val callback: Callback) : | ||
| internal class ProcessLifecycleMonitor(internal val callback: Callback) : |
Member
There was a problem hiding this comment.
in theory this change is not needed, because the class itself is already internal.
mariusc83
force-pushed
the
mconstantin/rum-952/provide-batch-delete-in-background-property
branch
2 times, most recently
from
August 25, 2023 08:49
c45a5d5 to
1ceb35d
Compare
0xnm
approved these changes
Aug 25, 2023
xgouchet
approved these changes
Aug 25, 2023
Codecov Report
@@ Coverage Diff @@
## develop #1588 +/- ##
===========================================
+ Coverage 83.56% 83.60% +0.04%
===========================================
Files 443 443
Lines 15100 15114 +14
Branches 2258 2261 +3
===========================================
+ Hits 12618 12636 +18
+ Misses 1883 1875 -8
- Partials 599 603 +4
|
mariusc83
force-pushed
the
mconstantin/rum-952/provide-batch-delete-in-background-property
branch
from
August 25, 2023 11:17
1ceb35d to
231e837
Compare
mariusc83
deleted the
mconstantin/rum-952/provide-batch-delete-in-background-property
branch
August 25, 2023 11:49
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?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)