mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
sentry init
This commit is contained in:
@@ -23,6 +23,7 @@ dependencies {
|
|||||||
implementation project(':capacitor-push-notifications')
|
implementation project(':capacitor-push-notifications')
|
||||||
implementation project(':capacitor-share')
|
implementation project(':capacitor-share')
|
||||||
implementation project(':capacitor-storage')
|
implementation project(':capacitor-storage')
|
||||||
|
implementation project(':sentry-capacitor')
|
||||||
implementation project(':capacitor-voice-recorder')
|
implementation project(':capacitor-voice-recorder')
|
||||||
implementation project(':capacitor2-file-picker')
|
implementation project(':capacitor2-file-picker')
|
||||||
implementation "com.soundcloud.android:android-crop:1.0.0@aar"
|
implementation "com.soundcloud.android:android-crop:1.0.0@aar"
|
||||||
|
|||||||
@@ -55,6 +55,10 @@
|
|||||||
"pkg": "@capacitor/storage",
|
"pkg": "@capacitor/storage",
|
||||||
"classpath": "com.capacitorjs.plugins.storage.StoragePlugin"
|
"classpath": "com.capacitorjs.plugins.storage.StoragePlugin"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"pkg": "@sentry/capacitor",
|
||||||
|
"classpath": "io.sentry.capacitor.SentryCapacitor"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pkg": "capacitor-voice-recorder",
|
"pkg": "capacitor-voice-recorder",
|
||||||
"classpath": "com.tchvu3.capacitorvoicerecorder.VoiceRecorder"
|
"classpath": "com.tchvu3.capacitorvoicerecorder.VoiceRecorder"
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/sh
|
|||||||
include ':capacitor-storage'
|
include ':capacitor-storage'
|
||||||
project(':capacitor-storage').projectDir = new File('../node_modules/@capacitor/storage/android')
|
project(':capacitor-storage').projectDir = new File('../node_modules/@capacitor/storage/android')
|
||||||
|
|
||||||
|
include ':sentry-capacitor'
|
||||||
|
project(':sentry-capacitor').projectDir = new File('../node_modules/@sentry/capacitor/android')
|
||||||
|
|
||||||
include ':capacitor-voice-recorder'
|
include ':capacitor-voice-recorder'
|
||||||
project(':capacitor-voice-recorder').projectDir = new File('../node_modules/capacitor-voice-recorder/android')
|
project(':capacitor-voice-recorder').projectDir = new File('../node_modules/capacitor-voice-recorder/android')
|
||||||
|
|
||||||
|
|||||||
Generated
+21617
-14366
File diff suppressed because it is too large
Load Diff
@@ -96,6 +96,10 @@
|
|||||||
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
|
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
|
||||||
"@ngx-translate/core": "^13.0.0",
|
"@ngx-translate/core": "^13.0.0",
|
||||||
"@pdftron/pdfjs-express": "^8.0.1",
|
"@pdftron/pdfjs-express": "^8.0.1",
|
||||||
|
"@sentry/angular": "^7.13.0",
|
||||||
|
"@sentry/capacitor": "^0.10.1",
|
||||||
|
"@sentry/cli": "^2.10.0",
|
||||||
|
"@sentry/tracing": "^7.27.0",
|
||||||
"@types/jest-environment-puppeteer": "^4.4.1",
|
"@types/jest-environment-puppeteer": "^4.4.1",
|
||||||
"@types/puppeteer": "^5.4.4",
|
"@types/puppeteer": "^5.4.4",
|
||||||
"alasql": "^1.7.3",
|
"alasql": "^1.7.3",
|
||||||
|
|||||||
+33
-1
@@ -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 { BrowserModule, HammerModule } from '@angular/platform-browser';
|
||||||
import { RouteReuseStrategy } from '@angular/router';
|
import { RouteReuseStrategy } from '@angular/router';
|
||||||
|
|
||||||
@@ -67,10 +67,37 @@ import { IonicImageLoaderComponent, IonicImageLoaderModule } from 'ionic-image-l
|
|||||||
import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
|
import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
|
||||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
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 { FCM } from '@ionic-native/fcm/ngx';
|
||||||
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||||
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/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({
|
@NgModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
entryComponents: [],
|
entryComponents: [],
|
||||||
@@ -115,6 +142,11 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
|
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
|
||||||
|
{
|
||||||
|
provide: ErrorHandler,
|
||||||
|
// Attach the Sentry ErrorHandler
|
||||||
|
useValue: SentrySibling.createErrorHandler(),
|
||||||
|
},
|
||||||
StatusBar,
|
StatusBar,
|
||||||
//SplashScreen,
|
//SplashScreen,
|
||||||
HttpClient,
|
HttpClient,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { RouteService } from 'src/app/services/route.service';
|
|||||||
import { NativeNotificationService } from 'src/app/services/native-notification.service';
|
import { NativeNotificationService } from 'src/app/services/native-notification.service';
|
||||||
import { UserSession } from '../models/user.model';
|
import { UserSession } from '../models/user.model';
|
||||||
import { PermissionList } from '../models/permission/permissionList';
|
import { PermissionList } from '../models/permission/permissionList';
|
||||||
|
import * as Sentry from "@sentry/capacitor";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -132,6 +133,10 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
Sentry.captureException('Test Captured Exception');
|
||||||
|
throw new Error('Test Thrown Error');
|
||||||
|
Sentry.nativeCrash();
|
||||||
|
|
||||||
this.logDeviceInfo();
|
this.logDeviceInfo();
|
||||||
|
|
||||||
this.notificationsService.onReciveForeground();
|
this.notificationsService.onReciveForeground();
|
||||||
|
|||||||
@@ -15,5 +15,6 @@ export const environment = {
|
|||||||
defaultuserpwd: '', //tabteste@006,
|
defaultuserpwd: '', //tabteste@006,
|
||||||
chatOffline: true,
|
chatOffline: true,
|
||||||
presidencia: false,
|
presidencia: false,
|
||||||
version: '1.0.1'
|
version: '1.0.1',
|
||||||
|
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,4 +15,5 @@ export const environment = {
|
|||||||
defaultuserpwd: 'M@p2022', //tabteste@006,
|
defaultuserpwd: 'M@p2022', //tabteste@006,
|
||||||
chatOffline: true,
|
chatOffline: true,
|
||||||
presidencia: false,
|
presidencia: false,
|
||||||
|
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712'
|
||||||
};
|
};
|
||||||
|
|||||||
+26
@@ -8,10 +8,36 @@ import { defineCustomElements } from '@ionic/pwa-elements/loader';
|
|||||||
|
|
||||||
import "hammerjs"; // HAMMER TIME
|
import "hammerjs"; // HAMMER TIME
|
||||||
|
|
||||||
|
import * as Sentry from '@sentry/capacitor';
|
||||||
|
// The example is using Angular, Import '@sentry/vue' or '@sentry/react' when using a Sibling different than Angular.
|
||||||
|
import * as SentrySibling from '@sentry/angular';
|
||||||
|
// For automatic instrumentation (highly recommended)
|
||||||
|
import { Integration } from '@sentry/types';
|
||||||
|
import { BrowserTracing } from '@sentry/tracing';
|
||||||
|
|
||||||
if (environment.production) {
|
if (environment.production) {
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
);
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||||
.catch(err => console.log(err));
|
.catch(err => console.log(err));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user