This is a simple angular app that can generate errors and send to Sentry.
In order for your Sentry project to capture errors thrown by this sample app you will need to put in the Data Source Name (DSN) for your project in the Sentry.Init config. This is located in the file app.module.ts
in /angular-sentry/src/app/app.module.ts
NOTE: If you do not have a DSN you will need to obtain one by "Create a project - Angular" in the Sentry UI. And get the associated DSN.
Sentry.init({
dsn: "your-dsn-key" ,
});
- Install the necessary npm packages with
npm i
- Navigate to the app folder angular-sentry
- Run the command:
ng serve --open
(ornpm run start
defined in package.json). This will open your browser to *localhost:4200" where application is being served. NOTE: ensure you have Angular CLI installed withnpm install -g @angular/cli
This project was generated with Angular CLI version 11.2.2.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.