Monitoring

Once you deploy your integration, you’ll want to monitor its activity and behavior. The easiest way to do that is to monitor Cloud Function logs.

For more serious production deployment, it is highly recommended to opt into PagerDuty alerting.

Integration Logs

In order to access logs you need to use the Serverless CLI tool. You can only access each function handler logs individually. Since the main function for most integrations is webhook you can run:

serverless logs -f webhook -t

PagerDuty

Integrations have a built in monitoring capabilities using PagerDuty. In order to enable it you need to deploy your integration with additional --pagerduty flag:

layer-integrations deploy --pagerduty

This will prompt for additional PagerDuty credentials such as api_key and integration_key. The built in integration logger will push all warnings and erros to PagerDuty service so that you can be alerted if anything goes wrong.

Sentry

You can also enable Sentry service from command line using --sentry flag.

layer-integrations deploy --sentry

This will prompt for additional Sentry DSN input. The built in integration logger will push all warnings and erros to Sentry service so that you can be alerted if anything goes wrong.