This PR adds support for sending AutoView messages and IDs through from the React Native library (react-native-metrics). Only basic AutoView support exists in this change. More extensive changes to bring CollectionTracker and AutoView to UIKit are coming later.
Adds support for the AutoView event throughout MetricsLogger and ImpressionTracker classes.
Updates schema protos to latest version.
Removes Swift-side React Native view tracking. This has been moved entirely to TS.
Adds debug logging to ImpressionTracker.
Support for AutoView
Adds the AutoViewState struct, which contains all AutoView-related fields used across events. Both MetricsLogger and ImpressionTracker have been updated to use these structs as part of their logging API. The previous viewID fields are still there, but many of them will be deprecated or removed shortly.
As a departure from the previous design, AutoView is no longer a state in MetricsLogger, but instead a parameter that callers must pass in. This builds support for strong view associations as outlined in the design doc. Going forward, new callers of the logging classes must manage view associations themselves.
The View event can still be logged manually, and it will still cause subsequent viewIDs to be filled in on Actions and Impressions. However, filling in viewID is more of a stopgap measure and should be removed as soon as possible. Instead, relying on the viewID field in AutoView should be the way to scope Actions/Impressions to manually logged Views.
Finally, diagnostics has been updated to fill in history for autoViewID, and debug logging supports AutoView events as well.
Update schema protos
Updates autogenerated files and accommodates package moves (ie. Event_Device -> Common_Device). We now fill in the most up-to-date fields in LogRequest and event protos.
Remove Swift-side support for React Native view tracking
Now that AutoView support is completely on the TS side, we remove the Swift code. This is mostly in the ViewTracker class and test. In the future, we will also refactor/remove ViewTracker itself when AutoView comes to Swift/UIKit, but that's out of scope for this PR.
Debug logging for ImpressionTracker
It's very useful to log the impressions and content as it passes through ImpressionTracker. Added this logging via the delegate, which callers can create and integrate with ImpressionTracker as needed.
This PR adds support for sending AutoView messages and IDs through from the React Native library (
react-native-metrics
). Only basic AutoView support exists in this change. More extensive changes to bring CollectionTracker and AutoView to UIKit are coming later.AutoView
event throughoutMetricsLogger
andImpressionTracker
classes.ImpressionTracker
.Support for AutoView
Adds the
AutoViewState
struct, which contains all AutoView-related fields used across events. BothMetricsLogger
andImpressionTracker
have been updated to use these structs as part of their logging API. The previousviewID
fields are still there, but many of them will be deprecated or removed shortly.As a departure from the previous design, AutoView is no longer a state in
MetricsLogger
, but instead a parameter that callers must pass in. This builds support for strong view associations as outlined in the design doc. Going forward, new callers of the logging classes must manage view associations themselves.The View event can still be logged manually, and it will still cause subsequent
viewID
s to be filled in on Actions and Impressions. However, filling inviewID
is more of a stopgap measure and should be removed as soon as possible. Instead, relying on theviewID
field inAutoView
should be the way to scope Actions/Impressions to manually logged Views.Finally, diagnostics has been updated to fill in history for
autoViewID
, and debug logging supports AutoView events as well.Update schema protos
Updates autogenerated files and accommodates package moves (ie.
Event_Device
->Common_Device
). We now fill in the most up-to-date fields in LogRequest and event protos.Remove Swift-side support for React Native view tracking
Now that AutoView support is completely on the TS side, we remove the Swift code. This is mostly in the
ViewTracker
class and test. In the future, we will also refactor/removeViewTracker
itself when AutoView comes to Swift/UIKit, but that's out of scope for this PR.Debug logging for ImpressionTracker
It's very useful to log the impressions and content as it passes through ImpressionTracker. Added this logging via the delegate, which callers can create and integrate with ImpressionTracker as needed.