-
Notifications
You must be signed in to change notification settings - Fork 134
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
RUMM-1615 Refacto RUMAutoInstrumentation
to RUMInstrumentation
#652
Conversation
private weak var notificationCenter: NotificationCenter? | ||
|
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.
Addition: Keep a notification center weak ref to remove observers on deinit
. Even if we only have a single handler and a single sdk instance, it's an assumption we can't make at this level.
@@ -6,17 +6,17 @@ | |||
|
|||
import UIKit | |||
|
|||
internal protocol UIKitRUMUserActionsHandlerType: RUMCommandPublisher { | |||
internal protocol UIEventHandler: RUMCommandPublisher { |
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.
Just for clarity on what we handle here.
Same with UIKitRUMViewsHandlerType
-> UIViewControllerHandler
|
||
XCTAssertNotNil(longTaskConfigured.rum!.instrumentation!.longTaskThreshold) | ||
XCTAssertNil(longTaskConfigured.rum!.instrumentation!.uiKitRUMViewsPredicate) | ||
XCTAssertNil(longTaskConfigured.rum!.instrumentation!.uiKitRUMUserActionsPredicate) |
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.
Adding test for the long task auto-instrumentation and remove XCTAssertNil
on the config instance itself.
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.
Very good cleanup 👍. I found a few typos otherwise it's great.
b3e1017
to
7b103d6
Compare
What and why?
Refacto
RUMAutoInstrumentation
toRUMInstrumentation
to prepare support for manual-instrumentation of SwiftUI alongside auto-instrumentation of UIKit.The
SwiftUI
instrumentation will introduce a new view handler for tracking SwiftUI views navigation. this new handler will be instantiated and managed by theRUMInstrumentation
that centralised all handlers.How?
The
RUMInstrumentation
will now be instantiated when RUM is enabled regardless of the auto-instrumentation setup (with UIKit predicates or long task threshold). Its underlying auto-instrumentations can be activated independently to work alongside SwiftUI.Review checklist