Why are Cloud Function Errors Not Reported in Error Reporting Dashboard?

Viewed 414

In our Stackdriver logs, some functions are failing due to:

Error: memory limit exceeded. Function invocation was interrupted.

I easily solved the problem by deploying functions with more memory.

However the real problem is that these errors did not appear in the Error Reporting Dashboard: https://console.cloud.google.com/errors

Why do memory limit errors not appear in the Error Reporting Dashboard?

What other errors are not being reported?

Is this a bug that should be escalated to Google?

1 Answers

As mentioned by this answer, this kind of exceptions (memory exceeded) are Application-wide uncaught exceptions and they should be reported manually by the code.

My suggestion is to catch this kind of exceptions to be reported in the Error Reporting Dashboard and just to complement the errors, you can create a metric in Stackdriver Monitoring to check the behavior of the function and have a more friendly view of the function's behavior.

Related