Issue
The DataDog docs states that
Starting with version 2.16.0, with the
actionNameAttribute
initialization parameter, you can specify your own attribute that is used to name the action.
Thus you can have something like this in the DD configuration constructor:
DD_RUM.init({
...
trackInteractions: true,
actionNameAttribute: 'itemID',
...
})
Now both attributes itemID
and data-dd-action-name
can be used to name tap/click actions; data-dd-action-name
is favored when both attributes are present on an element.
However that seems to be the case only for the browser SDK, and not the React Native SDK. Is this really the case?
Solution
data-dd-action-name
is currently the only way to specify the target name of an action using the RUM React Native SDK.
Depending on your use case you may can also use the DdRum.addAction()
and DdRum.startAction()
methods for manual action tracking and provide the desired target name. There is an example of calling these methods in the Manual Instrumentation section of the RUM React Native SDK documentation.
Answered By - Eric Allen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.