Lumigo is not just great at monitoring your production application and alerting you to problems. Turns out our customers also love using it for debugging business logic errors during development because they can easily peek into the internal state of their application - every invocation event, event environment variable that was used, and the request and response for every HTTP/TCP requests their functions make to other services!
Let’s see how we can use this information to help us debug a problem in our business logic.
uploadReceiptfunction has thrown a few
As before, click on the row to see the invocations.
uploadReceiptfunction being highlighted as where the problem is. Since SNS is an async event source for Lambda, these failed invocations are retried automatically. From the overlapped Lambda icon (and the fact that it says
3 retries), you can tell that this invocation was indeed retried, but still failed.
uploadReceiptfunction’s icon to see more details about these invocations.
Well, we see the error
Cannot read property 'Name' of undefined and probably have some suspicion as to what it might be - maybe the SNS message is missing properties.
To find evidence to support our hypothesis, let’s look for a successful invocation and compare that with this.
If you don’t see full graph and Show Similar Transactions button you need to click See Full Transaction button on the left top corner of the graph window.
As you can see, a lot of the transactions had a
TypeError, we’re looking for a successful transaction without any issues.
uploadReceiptfunction to bring up its details. One thing that jumps out is that the SNS message contains an object in
RideDetailwhich has a
contrast that with the failed invocation, which complained about being to read
So there’s the problem. Looking at the code for
uploadReceipt confirms this: