-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPLAY-1868 Configure Session Replay uploader to be more eager #1363
REPLAY-1868 Configure Session Replay uploader to be more eager #1363
Conversation
@@ -17,7 +17,6 @@ internal class KeyWindowObserver: AppWindowObserver { | |||
if #available(iOS 13.0, tvOS 13.0, *) { | |||
return findONiOS13AndLater() | |||
} else { | |||
assertionFailure("TODO: RUMM-2409 `AppWindowObserver` isn't yet ready for this version of OS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧽 This is just cleanup. We don't yet support it below iOS 13.0 - we will add it later.
let uploadDelayFactors: (initial: Double, default: Double, min: Double, max: Double, changeRate: Double) = { | ||
let uploadDelayFactors: (initial: Double, min: Double, max: Double, changeRate: Double) = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default
was unused ✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -126,19 +124,19 @@ internal extension PerformancePreset { | |||
self.uploadDelayChangeRate = uploadDelayFactors.changeRate | |||
} | |||
|
|||
func updated(with: PerformancePresetOverride) -> PerformancePreset { | |||
func updated(with override: PerformancePresetOverride) -> PerformancePreset { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 🙌
meanFileAge: 5, // equivalent of `batchSize: .small` - see `DatadogCore.PerformancePreset` | ||
minUploadDelay: 1 // equivalent of `uploadFrequency: .frequent` - see `DatadogCore.PerformancePreset` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little bit ugly. Maybe we could share those enums 🤔
Is it any easier in v2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a simple way we can't because it is defined in DatadogCore
and SR doesn't depend on that module. It depends on DatadogInternal
and moving this enum in there would further break the isolation (it's already partially broken due to PerformancePresetOverride
). I think long term we rather won't need overrides and invent something better for this problem.
@maxep what's your take on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think settings by value enable greater flexibility. If that was exposed to user, then yes enum would have been best but since this is an internal contract between the core and Features, we can use values 👍
Datadog ReportBranch report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What and why?
📦 This PR tunes the performance of SR uploader, making it more eager. This is to increase reliability of replay uploads.
How?
The
PerformancePreset
for Session Replay is now overwritten with values that correspond touploadFrequency: .fast
andbatchSize: .small
setup.Review checklist
Custom CI job configuration (optional)