Log delivered_at and delivery_latency for immediate email deliveries#2128
Conversation
stephencdaly
left a comment
There was a problem hiding this comment.
This seems fine. I was wondering whether it makes sense to pass delivery_duration_ms in a hash as the second argument to EventLogger.log_form_event, as we only need to log this one place.
The intention of CurrentJobLoggingAttributes is more for setting attributes that will be set on most/many log lines. I don't think it's a big deal either way though.
aad9d0e to
8ac0ad0
Compare
8ac0ad0 to
7f3f7e2
Compare
Ahhhh yeah that makes more sense - just updated it do that instead. |
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2128.submit.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
Slow immediate email deliveries are hard to investigate when latency only lives in CloudWatch. This adds delivered_at and delivery_latency to job logs so we can spot patterns in log queries—e.g. whether delays cluster on a particular form—without cross-referencing metrics for every case.
Batch deliveries are unchanged. delivery_latency is milliseconds from submission creation to SES delivery confirmation.