Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 780 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 780 Bytes

angular2-stackdriver-typescript

Angular 2-6 stackdriver reporting class written in TypeScript Based on: https://github.com/GoogleCloudPlatform/stackdriver-errors-js

This class can be used with Angular Error handler to report errors to Google Stackdriver.

At first in ErrorHandler create instance of class

constructor(injector: Injector) {
        this.errorReportingInstance = new StackdriverErrorReporterSSR({
                key: STACKDRIVER_API_KEY,
                projectId: STACKDRIVER_PROJECT_ID,
                service: STACKDRIVER_SERVICE,
            }, injector.get(HttpClient));
    }

then you can report errors with:

this.errorReportingInstance.report()

Then go to https://console.cloud.google.com/errors to see errors.