-
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
RUMM-1658 Manual instrumentation of SwiftUI actions #661
Conversation
5b6b501
to
92f32c7
Compare
Sources/Datadog/RUM/Instrumentation/Actions/SwiftUI/SwiftUIActionModifier.swift
Outdated
Show resolved
Hide resolved
db8df52
to
c807806
Compare
92f32c7
to
7031b19
Compare
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 this looks like a good way 👌. Left one question, but to my SwiftUI
understanding it is not possible to make it more "automatic".
Datadog/Example/Scenarios/RUM/SwiftUIInstrumentation/SwiftUIRootViewController.swift
Outdated
Show resolved
Hide resolved
Sources/Datadog/RUM/Instrumentation/Actions/SwiftUI/SwiftUIActionModifier.swift
Show resolved
Hide resolved
7031b19
to
10b819a
Compare
Actually, I will have to remove the |
eab51e5
to
4732170
Compare
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.
👌 LG! Only wondering if RUMM-1764
is not a problem here - I don't remember the conclusion and if it impacts iOS or only Android.
Sources/Datadog/RUM/Instrumentation/Actions/SwiftUI/SwiftUIActionModifier.swift
Outdated
Show resolved
Hide resolved
IIRC It was concluded that Android will align to iOS by removing side-effect detection on manual instrumentation. |
Co-authored-by: Maciek Grzybowski <[email protected]>
0da46e2
to
283237c
Compare
What and why?
Actionable
SwiftUI
components such asButton
orNavigationLink
are rendered in an opaqueUIView
subclass:CGDrawingView
*. The SDK's auto-instrumentation ofUIEvent
s is not able to capture information from the view to accurately log an action event.Given the
SwiftUI
api, we have no way of providing an auto-instrumentation of actions so we have to provide a simple way for instrumentation User Actions manually.How?
We will provide a
SwiftUI.View
extension that allows tracking of Tap action by addingsimultaneousGesture
using aViewModifier
. TheGesture
will then send User Actions events through theGlobal.rum
.Review checklist