Skip to content

LG-12617: Add additional profile-related fields to enhanced Idv events#10270

Merged
matthinz merged 8 commits intomainfrom
matthinz/12617-profile-logging
Mar 29, 2024
Merged

LG-12617: Add additional profile-related fields to enhanced Idv events#10270
matthinz merged 8 commits intomainfrom
matthinz/12617-profile-logging

Conversation

@matthinz
Copy link
Copy Markdown
Contributor

@matthinz matthinz commented Mar 19, 2024

🎫 Ticket

Link to the relevant ticket:
LG-12617

🛠 Summary of changes

This PR updates the Idv::AnalyticsEventsEnhancer to add more fields to covered Idv-related events. Previously, we were only adding proofing_components. With this update we will add:

  • pending_profile_idv_level: The verification level associated with the user's pending profile
  • active_profile_idv_level: The verification level associated with the user's active profile

Additionally, a subset of events will have a new profile_history argument added. This argument is an array. Each item is a hash including the following fields:

  • id
  • active
  • idv_level
  • created_at
  • verified_at
  • activated_at
  • in_person_verification_pending_at
  • gpo_verification_pending_at
  • fraud_review_pending_at
  • fraud_rejection_at
  • fraud_pending_reason
  • deactivation_reason

@matthinz matthinz requested a review from a team March 19, 2024 23:46
Base automatically changed from matthinz/12657-update-analytics-events-enchanter to main March 20, 2024 17:00
@matthinz matthinz force-pushed the matthinz/12617-profile-logging branch 5 times, most recently from e0a4eec to c90896b Compare March 25, 2024 23:26
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@matthinz matthinz force-pushed the matthinz/12617-profile-logging branch from 6b22eee to 98b0c2b Compare March 28, 2024 21:31
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.
@matthinz matthinz force-pushed the matthinz/12617-profile-logging branch from ad22588 to 81cff75 Compare March 29, 2024 18:41
@jmax-gsa jmax-gsa self-requested a review March 29, 2024 19:10
Copy link
Copy Markdown
Contributor

@jmax-gsa jmax-gsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. That cleaned up nicely.

@matthinz matthinz merged commit a071176 into main Mar 29, 2024
@matthinz matthinz deleted the matthinz/12617-profile-logging branch March 29, 2024 19:48
@aduth aduth mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants