How can i get the email notification for Cloud functions logs?

1.5k Views Asked by At

I am using Google Cloud Functions which through a lot of errors while running. I want to get all error details by email notification. I have tried to set up Alerts in the GCP console (I can able to configure the count of log entries). Unable to get the error details by email.

2

There are 2 best solutions below

0
On

You can use the cloud operations suite to setup alerts for errors being thrown in your application to then act on those alerts.

For example you can get email alerts, but there's a whole heap of other options too, like SMS, or to trigger pub/sub or http webhooks (eg to Slack channels) etc.

0
On

I recommend you to use a log based metric on Cloud Logging.

Then you can create an alert on this metrics

On the notification channel, you can choose Email, or something else (PubSub message, Slack messages,...)