dd-sdk-ios icon indicating copy to clipboard operation
dd-sdk-ios copied to clipboard

RUM-6263 Trigger based approach

Open maciejburda opened this issue 1 year ago • 1 comments

What and why?

A short description of what changes this PR introduces and why.

How?

A brief description of implementation details of this PR.

Review checklist

  • [ ] Feature or bugfix MUST have appropriate tests (unit, integration)
  • [ ] Make sure each commit and the PR mention the Issue number or JIRA reference
  • [ ] Add CHANGELOG entry for user facing changes

maciejburda avatar Oct 03 '24 11:10 maciejburda

Datadog Report

Branch report: maciey/RUM-6263-trigger-based-recording Commit report: 8450ffd Test service: dd-sdk-ios

:x: 1 Failed (1 Known Flaky), 192 Passed, 3147 Skipped, 17.27s Total duration (1m 47.66s time saved)

:x: Failed Tests (1)

  • testWhenEnabled_itSendsConfigurationTelemetry - SessionReplayTests - :snowflake: Known flaky - Details

    Expand for error
    ssertion Failure at SessionReplayTests.swift:216: XCTUnwrap failed: expected non-nil value of type "ConfigurationTelemetry"
    

I have addressed all the feedback, which led to small refactor. But I think it makes more sense now.

Key change is that trigger is a dependency of coordinator and it notifies it through a delegate pattern.

On checking shouldSkipFrame outside of queue. I made some tests and it's significantly more performant when done from within the queue. Screenshot 2024-10-23 at 13 37 00 Screenshot 2024-10-23 at 13 38 20

maciejburda avatar Oct 23 '24 12:10 maciejburda

Addressed all the requested changes, and did some extra tests (internal).

SR Enabled: Screenshot 2024-10-23 at 15 39 04 SR Disabled: Screenshot 2024-10-23 at 15 40 40

maciejburda avatar Oct 23 '24 14:10 maciejburda

We decided to slightly revamp the approach. Closing this one for the time being.

maciejburda avatar Nov 18 '24 14:11 maciejburda

Just noticed I need to add tests for the new swizzlers. On it. Will reopen when done.

maciejburda avatar Nov 29 '24 13:11 maciejburda