Google Stackdriver provides a suite of monitoring tools that help you understand what's going on in your Cloud Functions.
Writing and viewing logs
Stackdriver Logging captures and stores Cloud Functions logs.
Read more about writing and viewing logs from Cloud Functions.
Stackdriver Error Reporting captures specially formatted error logs and displays them in the Error Reporting dashboard.
Read more about reporting errors from Cloud Functions.
Viewing monitored metrics
Stackdriver Monitoring records metrics regarding the execution of Cloud Functions.
Read more about viewing recorded metrics for Cloud Functions.