REPLAY-1868 Configure Session Replay uploader to be more eager#1363
Conversation
| 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.
🧽 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) = { |
| } | ||
|
|
||
| func updated(with: PerformancePresetOverride) -> PerformancePreset { | ||
| func updated(with override: PerformancePresetOverride) -> PerformancePreset { |
| 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.
a little bit ugly. Maybe we could share those enums 🤔
Is it any easier in v2?
There was a problem hiding this comment.
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.
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: ✅ |
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
PerformancePresetfor Session Replay is now overwritten with values that correspond touploadFrequency: .fastandbatchSize: .smallsetup.Review checklist
Custom CI job configuration (optional)