fix(metrics): Add flowId and flowBeginTime to headers if avalible #241
Conversation
|
This looks great to me. Did we really need the |
| @@ -268,15 +268,22 @@ module.exports = function (log) { | |||
|
|
|||
| var links = this._generateLinks(this.verificationUrl, message.email, query, templateName) | |||
|
|
|||
| var headers = { | |||
seanmonstar
Dec 16, 2016
Member
Nit if you want, I guess we prefer let now over var wherever possible. If I didn't have the question about flowBeginTime, I would have merged regardless, so however you like.
Nit if you want, I guess we prefer let now over var wherever possible. If I didn't have the question about flowBeginTime, I would have merged regardless, so however you like.
vbudhram
Dec 19, 2016
Author
Contributor
Updated this to use let but the l10 extraction complains that it is a reserved keyword. @vladikoff is this something we should update to exclude let or should we hold off on using it in repo for now?
Updated this to use let but the l10 extraction complains that it is a reserved keyword. @vladikoff is this something we should update to exclude let or should we hold off on using it in repo for now?
Yes, although one could argue that it's mostly for historical reasons at this point. You need to know the flowBeginTime to validate the signature in the flowId, and we use it to calculate and log the time between start of flow and each particular event. You're right that this second usage could be done in post-processing based on data in the DB, but that wasn't obvious when we were designing these events initially. If it becomes a PITA to keep passing this timestamp around then we could try to refactor ourselves towards doing it in the DB. |
|
@rfk Made mozilla/fxa-auth-server#1594 to help track instances we might need to refactor |
|
from mtg: don't use |
|
@vladikoff @seanmonstar Mind an official r? |
|
Looks good! |
This PR adds support for forwarding the
flowIdandflowBeginTimevalues in the email headers. These will be used to track email bounce events that correspond to flows. This has been added to all our emails exceptverificationReminderEmail.Part of mozilla/fxa-auth-server#1425