guardian / flexible-octopus-converter

An AWS Lambda for converting JSON from Octopus into Thrift.
1 stars 0 forks source link

Additional logging at the beginning and end of handler #3

Closed jennygrahamjones closed 4 years ago

jennygrahamjones commented 4 years ago

Our logs suggest that we are receiving some payloads that do not match our expected models, but we don't have any logging to confirm this. These are instances when the lambda is invoked and throws no errors, but does not log (aside from the default lambda log events that record duration, memory used, etc.) or put anything to the Thrift Kinesis stream.

SHession commented 4 years ago

Have you got any examples of this issue you can link? I haven't seen any data for the custom metrics

jennygrahamjones commented 4 years ago

Have you got any examples of this issue you can link? I haven't seen any data for the custom metrics

This is the one incident I noticed this morning, when we were due to receive the daily snapshot: https://logs.gutools.co.uk/goto/87a7048f2765074d5467bab95c10c95c

The Metrics are all written after we've called validatePayload, and only on payloads that are valid, so I don't think that they'd be currently capturing what's gone wrong.

SHession commented 4 years ago

I see what you mean. Should this go on the dead letter queue? Should we also have a metric for this?

jennygrahamjones commented 4 years ago

I see what you mean. Should this go on the dead letter queue? Should we also have a metric for this?

Yes, to both of those. I'll add them to the PR. Thanks!