Using Firebase cloud functions with Javascript on a Blaze plan. Here are two log lines from Logs Explorer:

The function execution is stopped by a TypeError exception, but the associated logs respectively have the Default and Debug severity levels, making them hard to spot in the logs.
This prevents from using GCP's Error Reporting service to monitor Firebase cloud functions, since it would ignore these errors.
A workaround is to create a log based metric with a filter like
resource.type="cloud_function"
(severity>=ERROR OR textPayload:"finished with status: 'error'")
and to set an alarm with notifications on it.
Do you experience the same issue, should it be considered as a firebase functions bug?
This is a known issue, there exists a feature request for a similar issue in public issue tracker. Feel free to add your concern over this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With