Sentry

Jak pridat sentry do Ionic projektu

Oficialni navod: https://docs.sentry.io/platforms/javascript/ionic/

npm i —save sentry-cordova

cordova plugin add 0.71.0|avodroc-yrtnes#0.71.0|avodroc-yrtnes - bacha na spravnou verzi, chce to najit a vyzkouset dobrou a stabilni

Nepouzivat ionic cordova plugin add, protoze to vola spatne

Pridat do package.json :
"config": {
"ionic_generate_source_map": "true"
}

Pridat do [ai]uild.sh : —source-map

Do app.module.ts:

import * as Sentry from 'sentry-cordova';
import { SentryIonicErrorHandler } from './providers/sentry.provider';

Sentry.init({ dsn: 'https://fbe01e37cc1e4780941d42eb8e61b839@sentry.io/1848043' });

providers: [
….
{ provide: ErrorHandler, useClass: SentryIonicErrorHandler },

do tsconfig.json pridat:

"compilerOptions": {
"sourceMap": true,
"inlineSources": true,
"sourceRoot": "/"

Není-li uvedeno jinak, obsah této stránky je pod licencí Creative Commons Attribution-ShareAlike 3.0 License