store whole flow session in analytics if unable to find DCS during async document upload#4528
Conversation
| @flow.analytics.track_event(Analytics::DOC_AUTH_ASYNC, | ||
| error: 'failed to load document_capture_session', | ||
| uuid: flow_session[verify_document_capture_session_uuid_key], | ||
| flow_session: flow_session, |
There was a problem hiding this comment.
ummmm this possibly contains PII right? we store the attributes here between steps?
There was a problem hiding this comment.
Yeah, this is my first thought as well. Maybe something like flow_session.keys? Or a select set of values that we know aren't PII?
We should probably also add a flag to make sure this only happens in dev just to be safe.
There was a problem hiding this comment.
Maybe we can do a redacted log? A few ideas:
- just log if the key is empty or present?
- a refacted log? like run though all the keys and put in X for letters and # for numbers, ex:
SecureRandom.uuid.gsub(/\d/, '#').gsub(/\w/, 'X')
=> "#X####XX-##X#-#X##-####-##X####X###X"There was a problem hiding this comment.
right, I will try the subset of safe values and ensure only dev, and probably include the keys as well
There was a problem hiding this comment.
added b92316e which will only store the flow session keys and the flow session (excluding pii_from_doc) in dev
No description provided.