This code is outdated and no longer maintained. I was told sentry.io is a good looking alternative here.
Call a webhook when a new issue is reported in firebase crashlytics.
Note: This assumes that you have Crashlytics in Firebase. Learn more about Crashlytics
Create and setup the Firebase project:
- Create a Firebase project using the Firebase Developer Console.
- Enable Billing on your Firebase by switching to the Blaze or Pay as you Go plan, this is currently needed to be able to perform HTTP requests to external services from a Cloud Function.
- Include Crashlytics in your project.
Configuring the hook
- Clone or download this repo.
- You must have the Firebase CLI installed. If you don't have it, install it with
npm install -g firebase-tools
and then configure it withfirebase login
. - Configure the CLI locally by using
firebase use --add
and select your project in the list. - Install
npm
dependencies in the functions directory locally, by running:cd functions; npm install;
- Set the environment variable for the webhook:
firebase functions:config:set webhook.url="http://www.example.com/hook/crash"
- Deploy your project using
firebase deploy
- Simulate a test crash. Instructions