mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
@@ -128,10 +128,6 @@
|
||||
"@opentelemetry/sdk-trace-web": "^1.25.1",
|
||||
"@opentelemetry/semantic-conventions": "^1.25.1",
|
||||
"@pdftron/pdfjs-express": "^8.0.1",
|
||||
"@sentry/angular": "^7.73.0",
|
||||
"@sentry/capacitor": "^0.14.0",
|
||||
"@sentry/cli": "^2.33.1",
|
||||
"@sentry/tracing": "^7.114.0",
|
||||
"@teamhive/capacitor-video-recorder": "^5.0.0",
|
||||
"@tinymce/tinymce-angular": "^4.2.4",
|
||||
"@types/jest-environment-puppeteer": "^5.0.3",
|
||||
|
||||
@@ -66,7 +66,6 @@ import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
|
||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
import * as SentrySibling from '@sentry/angular';
|
||||
import { AngularFireModule } from '@angular/fire';
|
||||
import { AngularFireMessagingModule } from '@angular/fire/messaging';
|
||||
import { firebaseConfig } from '../firebase-config';
|
||||
@@ -92,49 +91,6 @@ import { SessionExpiredModalPageModule } from './modals/session-expired-modal/se
|
||||
import { Logger } from './services/logger/main/service';
|
||||
|
||||
registerLocaleData(localePt, 'pt');
|
||||
// import * as Sentry from '@sentry/capacitor';
|
||||
// import { Integration } from '@sentry/types';
|
||||
// import { BrowserTracing } from '@sentry/tracing';
|
||||
// import { LogsDatabase } from './infra/database/dexie/instance/logs/service';
|
||||
// import { AppErrorHandler } from './infra/crash-analytics/app-error-handler';
|
||||
|
||||
|
||||
|
||||
// Sentry.init(
|
||||
// {
|
||||
// dsn: 'https://5b345a3ae70b4e4da463da65881b4aaa@o4504340905525248.ingest.sentry.io/4504345615794176',
|
||||
// // 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,
|
||||
// debug: true, // logs to console
|
||||
// beforeSend(event) {
|
||||
// console.log('event.exception.values[0].value', event.exception.values[0].value);
|
||||
|
||||
// if (event.level === 'error') {
|
||||
|
||||
// LogsDatabase.sentryError.add(event as any).then(() => {
|
||||
// console.log('event', event)
|
||||
// })
|
||||
|
||||
// // openTelemetryLogging.send({
|
||||
// // level: 'info',
|
||||
// // message: event.exception.values[0].value,
|
||||
// // payload: {
|
||||
// // object: {
|
||||
// // sentry: true,
|
||||
// // error: event
|
||||
// // }
|
||||
// // },
|
||||
// // })
|
||||
// }
|
||||
// // Return event to send it to Sentry
|
||||
// return event;
|
||||
// },
|
||||
// }
|
||||
// );
|
||||
|
||||
|
||||
(function () {
|
||||
|
||||
@@ -23,11 +23,11 @@ export function APIReturn(schema: z.ZodTypeAny, context: string) {
|
||||
ColoredLoggerService.error(error.errors, 'API unexpected data structure '+ context)
|
||||
console.error(result.value)
|
||||
// Capture the Zod validation error with additional context
|
||||
Sentry.withScope((scope) => {
|
||||
scope.setTag('APIReturn', 'user');
|
||||
scope.setContext('data', { data: result.value });
|
||||
Sentry.captureException(error);
|
||||
});
|
||||
// Sentry.withScope((scope) => {
|
||||
// scope.setTag('APIReturn', 'user');
|
||||
// scope.setContext('data', { data: result.value });
|
||||
// Sentry.captureException(error);
|
||||
// });
|
||||
|
||||
} else {
|
||||
console.log('failed to setup the connection successful')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Result } from 'neverthrow';
|
||||
import { z, ZodError } from 'zod';
|
||||
import * as Sentry from '@sentry/capacitor';
|
||||
import { ColoredLoggerService } from '../logger/colored/service';
|
||||
|
||||
export function SocketStreamReturn(schema: z.ZodTypeAny, context: string) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Either, error, ok} from "src/app/services/Either"
|
||||
import * as Sentry from '@sentry/capacitor';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -69,7 +69,7 @@ export class FileValidatorService {
|
||||
|
||||
imageDiv.onerror = (e: Event) => {
|
||||
resolve(error(e))
|
||||
Sentry.captureMessage('FileValidatorService invalid image content');
|
||||
//Sentry.captureMessage('FileValidatorService invalid image content');
|
||||
}
|
||||
|
||||
imageDiv.src = base64Image
|
||||
@@ -92,7 +92,7 @@ export class FileValidatorService {
|
||||
|
||||
videoElement.addEventListener('error', () => {
|
||||
resolve(ok(true))
|
||||
Sentry.captureMessage('FileValidatorService invalid video content');
|
||||
//Sentry.captureMessage('FileValidatorService invalid video content');
|
||||
});
|
||||
})
|
||||
|
||||
@@ -113,7 +113,7 @@ export class FileValidatorService {
|
||||
|
||||
videoElement.addEventListener('error', () => {
|
||||
resolve(ok(true))
|
||||
Sentry.captureMessage('FileValidatorService invalid video content');
|
||||
//Sentry.captureMessage('FileValidatorService invalid video content');
|
||||
});
|
||||
})
|
||||
|
||||
@@ -152,7 +152,7 @@ export class FileValidatorService {
|
||||
if(a) {
|
||||
return ok(true)
|
||||
} else {
|
||||
Sentry.captureMessage('FileValidatorService invalid filename '+ filename);
|
||||
//Sentry.captureMessage('FileValidatorService invalid filename '+ filename);
|
||||
return error(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
import { Event } from '@sentry/types/types/event';
|
||||
|
||||
-18
@@ -16,24 +16,6 @@ import 'src/app/services/monitoring/opentelemetry/matrix';
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
/* Sentry.init(
|
||||
{
|
||||
dsn: 'https://5b345a3ae70b4e4da463da65881b4aaa@o4504340905525248.ingest.sentry.io/4504345615794176',
|
||||
// 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.
|
||||
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)
|
||||
.catch(err => console.log(err));
|
||||
|
||||
Reference in New Issue
Block a user