Skip to content

LG-13123 Log when GpoConfirmationUploader uploads GpoConfirmations#10943

Merged
jmhooper merged 3 commits intomainfrom
jmhooper-log-gpo-confirmation-upload
Jul 16, 2024
Merged

LG-13123 Log when GpoConfirmationUploader uploads GpoConfirmations#10943
jmhooper merged 3 commits intomainfrom
jmhooper-log-gpo-confirmation-upload

Conversation

@jmhooper
Copy link
Contributor

We have observed a number of issues with the GpoConfirmationUploader. We are adding more visibility to the job to improve our monitoring and alerting to deal with failures.

This commit adds a line to events.log when confirmations get uploaded. It includes a count of the confirmations that were uploaded so we can build a metric for that.

This new logging is in addition to the records that get written to the letter_requests_to_usps_ftp_logs which are used in monthly reports.

We have observed a number of issues with the `GpoConfirmationUploader`. We are adding more visibility to the job to improve our monitoring and alerting to deal with failures that come up.

This commit adds a line to `events.log` when confirmations get uploaded. It includes a count of the confirmations that were uploaded so we can build a metric for that.

[skip changelog]
@jmhooper jmhooper requested a review from a team July 16, 2024 14:33
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.

👍


# @params [Boolean] success Whether records were successfully uploaded
# @params [String] exception The exception that occured if an exception did occur
# @param [Number] gpo_confirmation_count The number of GPO Confirmation records uplaoded
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Typo

Suggested change
# @param [Number] gpo_confirmation_count The number of GPO Confirmation records uplaoded
# @param [Number] gpo_confirmation_count The number of GPO Confirmation records uploaded

)
rescue StandardError => error
analytics.gpo_confirmation_upload(
success: false, exception: error.to_s, gpo_confirmation_count: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Any chance the stringified error includes sensitive values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there is a risk of that if an unencrypted confirmation record gets inspected. I don't see a way for that to happen but that doesn't mean it won't. I'm not sure what the best way to balance that risk is and this error is already reported to NewRelic.

@jmhooper jmhooper merged commit a47eab5 into main Jul 16, 2024
@jmhooper jmhooper deleted the jmhooper-log-gpo-confirmation-upload branch July 16, 2024 17:30
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