-
Notifications
You must be signed in to change notification settings - Fork 114
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
LG-12617: Add additional profile details to IdV analytics logs #10216
Conversation
Don't include nil values here
Summarize the history of a user's profiles in IdV analytics events changelog: Internal, Identity verification, Include profile metadata in analytics logs
@@ -50,7 +50,28 @@ def self.included(_mod) | |||
def common_analytics_attributes | |||
{ | |||
proofing_components: proofing_components, | |||
} | |||
active_profile_idv_level: active_profile&.idv_level, |
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.
Should these be in the IdV events enhancer or is there value in logging these on all analytics events?
profile_history: profile_history, | ||
|
||
}.compact |
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.
style nit: remove this blank line?
profile_history: profile_history, | |
}.compact | |
profile_history: profile_history, | |
}.compact |
def profile_history | ||
return [] if !user&.respond_to?(:profiles) | ||
(user&.profiles || []). | ||
sort_by { |profile| profile.created_at }. |
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.
small suggestion
sort_by { |profile| profile.created_at }. | |
sort_by(&:created_at) |
Closing for now -- going to do a little work on |
🎫 Ticket
Link to the relevant ticket:
LG-12617
🛠 Summary of changes
This PR starts augmenting identity verification related analytics events with information about the user's existing profiles:
active_profile_idv_level
contains the level of identity verification for the user's active profile (if any)pending_profile_idv_level
contains the level of identity verification for the user's pending profile (if any)profile_history
contains an array with metadata about the user's profiles. This includes various*_at
timestamps and other flags.nil
values are excluded.📜 Testing Plan
Provide a checklist of steps to confirm the changes.
events.log
:tail -f log/events.log
profile_history
is added to IdV eventsprofile_history
on new events includes the user's old profile and, after verification, their new one as well.