sentry init

This commit is contained in:
Eudes Inácio
2022-12-17 17:46:08 +01:00
parent 79f343ca49
commit 8abc4319ea
10 changed files with 21696 additions and 14368 deletions
+33 -1
View File
@@ -1,4 +1,4 @@
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA, ErrorHandler } from '@angular/core';
import { BrowserModule, HammerModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
@@ -67,10 +67,37 @@ import { IonicImageLoaderComponent, IonicImageLoaderModule } from 'ionic-image-l
import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
// The example is using Angular, Import '@sentry/vue' or '@sentry/react' when using a Sibling different than Angular.
import * as SentrySibling from '@sentry/angular';
import * as Sentry from '@sentry/capacitor';
// The example is using Angular, Import '@sentry/vue' or '@sentry/react' when using a Sibling different than Angular.
// For automatic instrumentation (highly recommended)
import { Integration } from '@sentry/types';
import { BrowserTracing } from '@sentry/tracing';
/* import { FCM } from '@ionic-native/fcm/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
Sentry.init(
{
dsn: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
// To set your release and dist versions
release: 'gabinetedigital@1.0.0',
dist: '1',
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
tracesSampleRate: 1.0,
integrations: [
new BrowserTracing({
tracingOrigins: ['localhost', 'https://gd-api.oapr.gov.ao/api/'],
}) as Integration,
]
},
// Forward the init method to the sibling Framework.
SentrySibling.init
);
@NgModule({
declarations: [AppComponent],
entryComponents: [],
@@ -115,6 +142,11 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
],
providers: [
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
{
provide: ErrorHandler,
// Attach the Sentry ErrorHandler
useValue: SentrySibling.createErrorHandler(),
},
StatusBar,
//SplashScreen,
HttpClient,