Log reference_id from Telesign response for easier debugging
What does this MR do and why?
Partially resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/411
Background: When users experience problems while verifying their identity by providing a phone number, we usually collaborate with Telesign (our SMS provider) to debug the problem. One of the first things they ask for is the reference_id
for the SMS transaction but we currently don't include that when logging.
What this MR does: This MR improves our logging by including reference_id
field of the JSON response from Telesign.
Screenshots or screen recordings
Sample log entry from application_json.log
{
"severity": "INFO",
"time": "2023-07-05T09:28:48.359Z",
"correlation_id": "5eff12ff5fe8f48d7eacf7df31460de3",
"class": "PhoneVerification::TelesignClient::SendVerificationCodeService",
"message": "IdentityVerification::Phone",
"event": "Sent a phone verification code with Telesign",
"telesign_reference_id": "360F69274E0813049191FB5A94308801", # <<< THIS IS THE NEW FIELD
"telesign_response": "Transaction completed successfully",
"telesign_status_code": "200",
"username": "user1"
}
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.