action-destinations icon indicating copy to clipboard operation
action-destinations copied to clipboard

Pass eventOccurredTS value to the custom_args of the sendgrid/twilio body

Open miguelpdiaz8 opened this issue 1 year ago • 9 comments

In the DestinationAction payload we receive eventOccurredTS, which we use to stats event delivery latency which is for some reason called eventDeliveryTS. Regardless of confusing name - this metric helps to understand how much time it took from the event creation till the end of event processing by Destination Action.

It would be helpful to pass that eventOccurredTS value to the custom_args of the sendgrid/twilio body, so it will be returned to a webhook call after email/sms is delivered and we can add that [twilio|sendgrid]_eventDeliveryDuration metric to engage-events-ingest service (supplying all the tags that twilio_total and sendgrid_total have) to track how much time it takes for email/sms to be delivered from the moment of placing it to centrifuge to the moment of delivering it to the user.

Testing

Updated unit tests

miguelpdiaz8 avatar Mar 27 '24 16:03 miguelpdiaz8

hi @miguelpdiaz8 please let me know when someone on your team has reviewed, and when you are happy for me to review+deploy.

joe-ayoub-segment avatar Apr 03 '24 08:04 joe-ayoub-segment

hi @miguelpdiaz8 please let me know when someone on your team has reviewed, and when you are happy for me to review+deploy.

Hi @joe-ayoub-segment I just shared it with the team, and you can review it too, thanks

miguelpdiaz8 avatar Apr 03 '24 16:04 miguelpdiaz8

hi @miguelpdiaz8 @pmunin @cogwizzle - just a reminder to let me know when I can review / deploy

joe-ayoub-segment avatar Apr 08 '24 12:04 joe-ayoub-segment

Looks good. I'll defer to @pmunin as he has requested additional changes.

cogwizzle avatar Apr 11 '24 13:04 cogwizzle

Can you confirm if adding a new field within custom_args impacts the processing of current event payload with [engage-events-ingest service? In theory, it shouldn't. But in the past, we have seen payloads get dropped (4xx response) due to bad format.

rahul8590 avatar Apr 11 '24 22:04 rahul8590

Can you confirm if adding a new field within custom_args impacts the processing of current event payload with [engage-events-ingest service? In theory, it shouldn't. But in the past, we have seen payloads get dropped (4xx response) due to bad format.

So you are saying there is no a hard limit of 10 custom args? @rahul8590

miguelpdiaz8 avatar Apr 15 '24 15:04 miguelpdiaz8

hi @miguelpdiaz8 @pmunin @rahul8590 @cogwizzle - friendly reminder to let me know when this is ready for deploy.

joe-ayoub-segment avatar Apr 16 '24 10:04 joe-ayoub-segment

hi @miguelpdiaz8 - please let me know when this PR is ready for review / and then to be deployed. If you need more time please convert it to a draft PR :)

joe-ayoub-segment avatar Apr 23 '24 12:04 joe-ayoub-segment

Hi @miguelpdiaz8 if this PR isn't going to be progressed for the moment can we close it please?

joe-ayoub-segment avatar Jul 16 '24 09:07 joe-ayoub-segment