LG-12617: Add additional profile-related fields to enhanced Idv events#10270
Merged
LG-12617: Add additional profile-related fields to enhanced Idv events#10270
Conversation
Base automatically changed from
matthinz/12657-update-analytics-events-enchanter
to
main
March 20, 2024 17:00
jmax-gsa
reviewed
Mar 20, 2024
zachmargolis
approved these changes
Mar 22, 2024
e0a4eec to
c90896b
Compare
matthinz
commented
Mar 26, 2024
Contributor
Author
There was a problem hiding this comment.
Rather than adding
active_profile_idv_level: nil,
pending_profile_idv_level: nil,
proofing_components: nil,here, I switched it (and several other specs) to use hash_including. My feeling is that these tests aren't really testing these extra analytics arguments--those should be covered by a combination of the Idv::AnalyticsEventsEnhancer spec and the analytics feature spec.
6b22eee to
98b0c2b
Compare
5 tasks
Summarize the history of a user's profiles in IdV analytics events changelog: Internal, Identity verification, Include profile metadata in analytics logs
Just return the levels, and use .presence to ensure falsey values are nil so they're compacted properly
It's a lot of data and we want to keep average event payload size low.
Adding the following to covered methods: - active_profile_idv_level - pending_profile_idv_level - profile_history Also making sure proofing_components is documented appropriately.
Sprinkle all these new args around a little.
Rather than add `active_profile_idv_level: nil, pending_profile_idv_level: nil` everywhere, I moved many of these over to using hash_including, which I think makes it clearer what these specs actually _care_ about checking.
ad22588 to
81cff75
Compare
jmax-gsa
approved these changes
Mar 29, 2024
Contributor
jmax-gsa
left a comment
There was a problem hiding this comment.
LGTM. That cleaned up nicely.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
Link to the relevant ticket:
LG-12617
🛠 Summary of changes
This PR updates the
Idv::AnalyticsEventsEnhancerto add more fields to covered Idv-related events. Previously, we were only addingproofing_components. With this update we will add:pending_profile_idv_level: The verification level associated with the user's pending profileactive_profile_idv_level: The verification level associated with the user's active profileAdditionally, a subset of events will have a new
profile_historyargument added. This argument is an array. Each item is a hash including the following fields:idactiveidv_levelcreated_atverified_atactivated_atin_person_verification_pending_atgpo_verification_pending_atfraud_review_pending_atfraud_rejection_atfraud_pending_reasondeactivation_reason