Skip to content

Add script to get OTP delivery logs for SMS, Voice#9019

Merged
zachmargolis merged 2 commits intomainfrom
margolis-oncall-otp-script
Aug 17, 2023
Merged

Add script to get OTP delivery logs for SMS, Voice#9019
zachmargolis merged 2 commits intomainfrom
margolis-oncall-otp-script

Conversation

@zachmargolis
Copy link
Contributor

@zachmargolis zachmargolis commented Aug 16, 2023

Why: Script to help triage OTP deliveries by pulling message IDs

changelog: Internal, Scripts, Add script to triage OTP delivery

Usage:

aws-vault exec prod-power -- ./bin/oncall/otp-deliveries uuid1 --csv
[ Querying logs ] --=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---= Time: 00:00:11
user_id,timestamp,message_id,delivery_preference,country_code
uuid1,2023-01-01T00:00:00Z,messageid1,sms,US

**Why**: Script to help triage OTP deliveries by pulling message IDs

changelog: Internal, Scripts, Add script to triage OTP delivery
@zachmargolis zachmargolis requested a review from a team August 16, 2023 20:28
@zachmargolis zachmargolis requested a review from a team August 16, 2023 22:55
@zachmargolis zachmargolis changed the title Add bin/oncall/otp-deliveries Add script to get OTP delivery logs for SMS, Voice Aug 16, 2023
@@ -82,70 +83,53 @@ class EmailDeliveries

# @return [Array<Result>]
def query_data(uuids)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

recommend viewing this with ?w=1 whitespace diff hidden

Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 👍

opts.banner = <<~EOM
Usage: #{$PROGRAM_NAME} uuid1 [uuid2...]

Looks up OTP delivery attempts for SMS/Voice by user UUID, within the last 72 hours
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we want hours to be configurable? I suppose we could add that later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For AWS pinpoint support, they need logs within the last 72 hours so IMO not worth it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Wasn't aware of that. Makes sense with the context.

@zachmargolis zachmargolis merged commit 924c6ed into main Aug 17, 2023
@zachmargolis zachmargolis deleted the margolis-oncall-otp-script branch August 17, 2023 15:24
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.

2 participants