-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: Capture Nearest UserAction Fields #1267
Conversation
Asset Size Report
Merging this pull request will result in the following asset size changes:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1267 +/- ##
==========================================
+ Coverage 88.67% 90.36% +1.68%
==========================================
Files 170 171 +1
Lines 7314 8202 +888
Branches 1478 1480 +2
==========================================
+ Hits 6486 7412 +926
+ Misses 714 698 -16
+ Partials 114 92 -22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM
The UserAction feature has been extended to capture "nearest" field values when the UserAction target does not include the desired fields. To facilitate this, a configuration was added allowing the user to control what fields are collected, specified as
init.user_actions.elementAttributes: []
. When empty, no extra fields will be collected. When supplied, the target will be checked for each property. This configuration defaults to['id', 'className', 'tagName', 'type']
, which matches the fields captured before this change.For each elementAttribute defined, if the property is not found, the agent will search up the parent tree of the target element, until the property is found. If found up the parent tree, a property called "nearest" + fieldName will be added to the event.
Overview
This was spawned from feedback and POC tied to internal NR1 use cases and product analytics. Exposing to customer base to benefit all.
Related Issue(s)
NR-359755
Testing
Test has been added