@nativescript-community/sentry 3.1.5 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +2 -6
- package/client.d.ts +38 -3
- package/client.js +143 -5
- package/client.js.map +1 -1
- package/index.d.ts +7 -11
- package/index.js +28 -12
- package/index.js.map +1 -1
- package/integrations/debugsymbolicator.d.ts +4 -4
- package/integrations/debugsymbolicator.js +11 -22
- package/integrations/debugsymbolicator.js.map +1 -1
- package/integrations/devicecontext.js +22 -5
- package/integrations/devicecontext.js.map +1 -1
- package/integrations/eventorigin.d.ts +7 -7
- package/integrations/eventorigin.js +9 -9
- package/integrations/eventorigin.js.map +1 -1
- package/integrations/nativescripterrorhandlers.d.ts +15 -5
- package/integrations/nativescripterrorhandlers.js +55 -44
- package/integrations/nativescripterrorhandlers.js.map +1 -1
- package/integrations/release.js +10 -8
- package/integrations/release.js.map +1 -1
- package/integrations/sdkinfo.d.ts +4 -1
- package/integrations/sdkinfo.js +17 -10
- package/integrations/sdkinfo.js.map +1 -1
- package/measurement.d.ts +4 -0
- package/measurement.js +50 -0
- package/measurement.js.map +1 -0
- package/measurements.d.ts +4 -0
- package/measurements.js +50 -0
- package/measurements.js.map +1 -0
- package/misc.d.ts +8 -0
- package/misc.js +17 -0
- package/misc.js.map +1 -0
- package/options.d.ts +125 -0
- package/options.js +2 -0
- package/options.js.map +1 -0
- package/package.json +9 -12
- package/platforms/android/buildscript.gradle +6 -2
- package/platforms/android/include.gradle +1 -1
- package/platforms/android/native-api-usage.json +4 -1
- package/platforms/android/sentry.aar +0 -0
- package/platforms/ios/Podfile +1 -1
- package/platforms/ios/src/NSSentry.h +8 -3
- package/platforms/ios/src/NSSentry.m +41 -0
- package/scope.d.ts +1 -45
- package/scope.js +90 -68
- package/scope.js.map +1 -1
- package/sdk.d.ts +27 -3
- package/sdk.js +105 -30
- package/sdk.js.map +1 -1
- package/tracing/index.d.ts +2 -1
- package/tracing/index.js +14 -6
- package/tracing/index.js.map +1 -1
- package/tracing/nativeframes.d.ts +68 -0
- package/tracing/nativeframes.js +175 -0
- package/tracing/nativeframes.js.map +1 -0
- package/tracing/nstracing.d.ts +98 -47
- package/tracing/nstracing.js +164 -44
- package/tracing/nstracing.js.map +1 -1
- package/tracing/routingInstrumentation.d.ts +46 -0
- package/tracing/routingInstrumentation.js +33 -0
- package/tracing/routingInstrumentation.js.map +1 -0
- package/tracing/stalltracking.d.ts +92 -0
- package/tracing/stalltracking.js +258 -0
- package/tracing/stalltracking.js.map +1 -0
- package/tracing/types.d.ts +13 -0
- package/tracing/types.js +2 -0
- package/tracing/types.js.map +1 -0
- package/tracing/utils.d.ts +22 -1
- package/tracing/utils.js +51 -2
- package/tracing/utils.js.map +1 -1
- package/transports/TextEncoder.d.ts +2 -0
- package/transports/TextEncoder.js +12 -0
- package/transports/TextEncoder.js.map +1 -0
- package/transports/native.d.ts +20 -8
- package/transports/native.js +21 -13
- package/transports/native.js.map +1 -1
- package/utils/envelope.d.ts +11 -0
- package/utils/envelope.js +21 -0
- package/utils/envelope.js.map +1 -0
- package/utils/outcome.d.ts +5 -0
- package/utils/outcome.js +19 -0
- package/utils/outcome.js.map +1 -0
- package/utils/safe.d.ts +17 -0
- package/utils/safe.js +46 -0
- package/utils/safe.js.map +1 -0
- package/vendor/buffer/index.d.ts +1 -0
- package/vendor/buffer/index.js +2 -0
- package/vendor/buffer/index.js.map +1 -0
- package/vendor/buffer/utf8ToBytes.d.ts +9 -0
- package/vendor/buffer/utf8ToBytes.js +81 -0
- package/vendor/buffer/utf8ToBytes.js.map +1 -0
- package/vendor/index.d.ts +1 -0
- package/vendor/index.js +2 -0
- package/vendor/index.js.map +1 -0
- package/version.d.ts +2 -1
- package/version.js +2 -1
- package/version.js.map +1 -1
- package/wrapper.android.d.ts +30 -0
- package/wrapper.android.js +952 -0
- package/wrapper.android.js.map +1 -0
- package/wrapper.d.ts +88 -0
- package/wrapper.ios.d.ts +34 -0
- package/wrapper.ios.js +497 -0
- package/wrapper.ios.js.map +1 -0
- package/pnpm-lock.yaml +0 -914
@@ -1,19 +1,29 @@
|
|
1
1
|
import { Integration } from '@sentry/types';
|
2
2
|
/** NativescriptErrorHandlers Options */
|
3
3
|
export interface NativescriptErrorHandlersOptions {
|
4
|
-
|
5
|
-
|
4
|
+
onerror?: boolean;
|
5
|
+
onunhandledrejection?: boolean;
|
6
|
+
/**
|
7
|
+
* When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.
|
8
|
+
* If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.
|
9
|
+
* Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections
|
10
|
+
*
|
11
|
+
* When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.
|
12
|
+
*
|
13
|
+
* @default true
|
14
|
+
*/
|
15
|
+
patchGlobalPromise?: boolean;
|
6
16
|
}
|
7
17
|
/** NativescriptErrorHandlers Integration */
|
8
18
|
export declare class NativescriptErrorHandlers implements Integration {
|
9
19
|
/**
|
10
20
|
* @inheritDoc
|
11
21
|
*/
|
12
|
-
|
22
|
+
static id: string;
|
13
23
|
/**
|
14
24
|
* @inheritDoc
|
15
25
|
*/
|
16
|
-
|
26
|
+
name: string;
|
17
27
|
/** NativescriptOptions */
|
18
28
|
private readonly _options;
|
19
29
|
/** Constructor */
|
@@ -25,8 +35,8 @@ export declare class NativescriptErrorHandlers implements Integration {
|
|
25
35
|
/**
|
26
36
|
* Handle Promises
|
27
37
|
*/
|
28
|
-
private _handleUnhandledRejections;
|
29
38
|
private globalHanderEvent;
|
39
|
+
handlingFatal: boolean;
|
30
40
|
private globalHander;
|
31
41
|
/**
|
32
42
|
* Handle erros
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { getCurrentHub } from '@sentry/core';
|
2
|
-
import {
|
3
|
-
import { logger } from '@sentry/utils';
|
2
|
+
import { addExceptionMechanism, logger } from '@sentry/utils';
|
4
3
|
import { Application, Trace } from '@nativescript/core';
|
5
4
|
/** NativescriptErrorHandlers Integration */
|
6
5
|
export class NativescriptErrorHandlers {
|
@@ -10,70 +9,82 @@ export class NativescriptErrorHandlers {
|
|
10
9
|
* @inheritDoc
|
11
10
|
*/
|
12
11
|
this.name = NativescriptErrorHandlers.id;
|
13
|
-
this.
|
12
|
+
this.handlingFatal = false;
|
13
|
+
this._options = Object.assign({
|
14
|
+
// uncaughtErrors: false,
|
15
|
+
onerror: true, onunhandledrejection: true, patchGlobalPromise: true }, options);
|
14
16
|
}
|
15
17
|
/**
|
16
18
|
* @inheritDoc
|
17
19
|
*/
|
18
20
|
setupOnce() {
|
19
|
-
this._handleUnhandledRejections();
|
21
|
+
// this._handleUnhandledRejections();
|
20
22
|
this._handleOnError();
|
21
23
|
}
|
22
24
|
/**
|
23
25
|
* Handle Promises
|
24
26
|
*/
|
25
|
-
_handleUnhandledRejections() {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
// data: { id },
|
38
|
-
// originalException: error
|
39
|
-
// });
|
40
|
-
// }
|
41
|
-
// });
|
42
|
-
}
|
43
|
-
}
|
27
|
+
// private _handleUnhandledRejections(): void {
|
28
|
+
// if (this._options.onunhandledrejection) {
|
29
|
+
// if (this._options.uncaughtErrors) {
|
30
|
+
// Application.on(Application.uncaughtErrorEvent, this.globalHanderEvent, this);
|
31
|
+
// }
|
32
|
+
// if (this._options.patchGlobalPromise) {
|
33
|
+
// this._polyfillPromise();
|
34
|
+
// }
|
35
|
+
// this._attachUnhandledRejectionHandler();
|
36
|
+
// this._checkPromiseAndWarn();
|
37
|
+
// }
|
38
|
+
// }
|
44
39
|
globalHanderEvent(event) {
|
45
40
|
this.globalHander(event.error);
|
46
41
|
}
|
47
|
-
globalHander(error, isFatal) {
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
async globalHander(error, isFatal) {
|
43
|
+
console.log('globalHander', error, isFatal);
|
44
|
+
// We want to handle fatals, but only in production mode.
|
45
|
+
const shouldHandleFatal = isFatal && !__DEV__;
|
46
|
+
if (shouldHandleFatal) {
|
47
|
+
if (this.handlingFatal) {
|
48
|
+
logger.log('Encountered multiple fatals in a row. The latest:', error);
|
49
|
+
return;
|
51
50
|
}
|
52
|
-
|
53
|
-
originalException: error
|
54
|
-
});
|
55
|
-
});
|
56
|
-
const client = getCurrentHub().getClient();
|
57
|
-
// If in dev, we call the default handler anyway and hope the error will be sent
|
58
|
-
// Just for a better dev experience
|
59
|
-
if (client) {
|
60
|
-
const timeout = client.getOptions().shutdownTimeout || 2000;
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
62
|
-
client.flush(timeout)
|
63
|
-
.catch(e => {
|
64
|
-
logger.error(e);
|
65
|
-
});
|
51
|
+
this.handlingFatal = true;
|
66
52
|
}
|
67
|
-
|
53
|
+
const currentHub = getCurrentHub();
|
54
|
+
const client = currentHub.getClient();
|
55
|
+
if (!client) {
|
56
|
+
logger.error('Sentry client is missing, the error event might be lost.', error);
|
68
57
|
// If there is no client something is fishy, anyway we call the default handler
|
69
|
-
//
|
58
|
+
// defaultHandler(error, isFatal);
|
59
|
+
return;
|
60
|
+
}
|
61
|
+
const options = client.getOptions();
|
62
|
+
const event = await client.eventFromException(error, {
|
63
|
+
originalException: error
|
64
|
+
});
|
65
|
+
if (isFatal) {
|
66
|
+
event.level = 'fatal';
|
67
|
+
addExceptionMechanism(event, {
|
68
|
+
handled: false,
|
69
|
+
type: 'onerror',
|
70
|
+
});
|
70
71
|
}
|
72
|
+
currentHub.captureEvent(event);
|
73
|
+
// if (!__DEV__) {
|
74
|
+
// void client.flush(options.shutdownTimeout || 2000).then(() => {
|
75
|
+
// defaultHandler(error, isFatal);
|
76
|
+
// });
|
77
|
+
// } else {
|
78
|
+
// // If in dev, we call the default handler anyway and hope the error will be sent
|
79
|
+
// // Just for a better dev experience
|
80
|
+
// defaultHandler(error, isFatal);
|
81
|
+
// }
|
71
82
|
}
|
72
83
|
/**
|
73
84
|
* Handle erros
|
74
85
|
*/
|
75
86
|
_handleOnError() {
|
76
|
-
if (this._options.
|
87
|
+
if (this._options.onerror) {
|
77
88
|
// let handlingFatal = false;
|
78
89
|
Application.on(Application.discardedErrorEvent, this.globalHanderEvent, this);
|
79
90
|
Trace.setErrorHandler({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nativescripterrorhandlers.js","sourceRoot":"","sources":["../../src/integrations/nativescripterrorhandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"nativescripterrorhandlers.js","sourceRoot":"","sources":["../../src/integrations/nativescripterrorhandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,qBAAqB,EAAmB,MAAM,EAAE,MAAM,eAAe,CAAC;AAI/E,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,MAAM,oBAAoB,CAAC;AA6BtD,4CAA4C;AAC5C,MAAM,OAAO,yBAAyB;IAgBlC,kBAAkB;IAClB,YAAmB,OAA0C;QAV7D;;WAEG;QACI,SAAI,GAAW,yBAAyB,CAAC,EAAE,CAAC;QA6CnD,kBAAa,GAAG,KAAK,CAAC;QArClB,IAAI,CAAC,QAAQ;YACT,yBAAyB;YACzB,OAAO,EAAE,IAAI,EACb,oBAAoB,EAAE,IAAI,EAC1B,kBAAkB,EAAE,IAAI,IACrB,OAAO,CACb,CAAC;IACN,CAAC;IAED;;OAEG;IACI,SAAS;QACZ,qCAAqC;QACrC,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,+CAA+C;IAC/C,gDAAgD;IAChD,8CAA8C;IAC9C,4FAA4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;QAClB,sEAAsE;QACtE,0CAA0C;QAC1C,UAAU;QACV,WAAW;QACX,uFAAuF;QACvF,0CAA0C;QAC1C,sCAAsC;QACtC,IAAI;IACR,CAAC;IAED;;OAEG;IACK,cAAc;QAClB,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACvB,6BAA6B;YAC7B,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;YAE9E,KAAK,CAAC,eAAe,CAAC;gBAClB,YAAY,EAAE,IAAI,CAAC,YAAY;aAClC,CAAC,CAAC;YACH,uFAAuF;YAEvF,gCAAgC;SACnC;IACL,CAAC;;AAhID;;GAEG;AACW,4BAAE,GAAW,2BAA2B,CAAC"}
|
package/integrations/release.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
|
2
|
-
import {
|
2
|
+
import { NATIVE } from '../wrapper';
|
3
3
|
/** Release integration responsible to load release from file. */
|
4
4
|
export class Release {
|
5
5
|
constructor() {
|
@@ -20,9 +20,9 @@ export class Release {
|
|
20
20
|
}
|
21
21
|
const options = (_a = getCurrentHub().getClient()) === null || _a === void 0 ? void 0 : _a.getOptions();
|
22
22
|
/*
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
__sentry_release and __sentry_dist is set by the user with setRelease and setDist. If this is used then this is the strongest.
|
24
|
+
Otherwise we check for the release and dist in the options passed on init, as this is stronger than the release/dist from the native build.
|
25
|
+
*/
|
26
26
|
if (typeof ((_b = event.extra) === null || _b === void 0 ? void 0 : _b.__sentry_release) === 'string') {
|
27
27
|
event.release = `${event.extra.__sentry_release}`;
|
28
28
|
}
|
@@ -39,10 +39,12 @@ export class Release {
|
|
39
39
|
return event;
|
40
40
|
}
|
41
41
|
try {
|
42
|
-
const
|
43
|
-
if (release) {
|
44
|
-
event.release = `${
|
45
|
-
|
42
|
+
const nativeRelease = (await NATIVE.fetchNativeRelease());
|
43
|
+
if (!event.release) {
|
44
|
+
event.release = `${nativeRelease.id}@${nativeRelease.version}+${nativeRelease.build}`;
|
45
|
+
}
|
46
|
+
if (!event.dist) {
|
47
|
+
event.dist = `${nativeRelease.build}.${__IOS__ ? 'ios' : 'android'}`;
|
46
48
|
}
|
47
49
|
}
|
48
50
|
catch (_Oo) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/integrations/release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/integrations/release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,iEAAiE;AACjE,MAAM,OAAO,OAAO;IAApB;QACI;;WAEG;QACI,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;IAqDrC,CAAC;IA/CG;;OAEG;IACI,SAAS;QACZ,uBAAuB,CAAC,KAAK,EAAE,KAAY,EAAE,EAAE;;YAC3C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,EAAE;gBACP,OAAO,KAAK,CAAC;aAChB;YACD,MAAM,OAAO,GAAG,MAAA,aAAa,EAAE,CAAC,SAAS,EAAE,0CAAE,UAAU,EAAE,CAAC;YAC1D;;;cAGE;YACF,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,gBAAgB,CAAA,KAAK,QAAQ,EAAE;gBACnD,KAAK,CAAC,OAAO,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;aACrD;iBAAM,IAAI,OAAO,CAAA,OAAO,aAAP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@sentry/types';
|
2
|
+
declare type DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;
|
3
|
+
export declare const defaultSdkInfo: DefaultSdkInfo;
|
2
4
|
/** Default SdkInfo instrumentation */
|
3
5
|
export declare class SdkInfo implements Integration {
|
4
6
|
/**
|
@@ -15,3 +17,4 @@ export declare class SdkInfo implements Integration {
|
|
15
17
|
*/
|
16
18
|
setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
|
17
19
|
}
|
20
|
+
export {};
|
package/integrations/sdkinfo.js
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
import { logger } from '@sentry/utils';
|
2
|
-
import { SDK_NAME, SDK_VERSION } from '../version';
|
3
|
-
import {
|
2
|
+
import { SDK_NAME, SDK_PACKAGE_NAME, SDK_VERSION } from '../version';
|
3
|
+
import { NATIVE } from '../wrapper';
|
4
|
+
export const defaultSdkInfo = {
|
5
|
+
name: SDK_NAME,
|
6
|
+
packages: [
|
7
|
+
{
|
8
|
+
name: SDK_PACKAGE_NAME,
|
9
|
+
version: SDK_VERSION,
|
10
|
+
},
|
11
|
+
],
|
12
|
+
version: SDK_VERSION,
|
13
|
+
};
|
4
14
|
/** Default SdkInfo instrumentation */
|
5
15
|
export class SdkInfo {
|
6
16
|
constructor() {
|
@@ -18,9 +28,9 @@ export class SdkInfo {
|
|
18
28
|
var _a;
|
19
29
|
// The native SDK info package here is only used on iOS as `beforeSend` is not called on `captureEnvelope`.
|
20
30
|
// this._nativeSdkInfo should be defined a following time so this call won't always be awaited.
|
21
|
-
if (
|
31
|
+
if (__IOS__ && this._nativeSdkInfo === null) {
|
22
32
|
try {
|
23
|
-
this._nativeSdkInfo = await
|
33
|
+
this._nativeSdkInfo = await NATIVE.fetchNativeSdkInfo();
|
24
34
|
}
|
25
35
|
catch (e) {
|
26
36
|
// If this fails, go ahead as usual as we would rather have the event be sent with a package missing.
|
@@ -29,14 +39,11 @@ export class SdkInfo {
|
|
29
39
|
}
|
30
40
|
}
|
31
41
|
event.platform = event.platform || 'javascript';
|
32
|
-
event.sdk = Object.assign(Object.assign({}, ((_a = event.sdk) !== null && _a !== void 0 ? _a : {})), {
|
42
|
+
event.sdk = Object.assign(Object.assign(Object.assign({}, ((_a = event.sdk) !== null && _a !== void 0 ? _a : {})), defaultSdkInfo), { packages: [
|
33
43
|
...((event.sdk && event.sdk.packages) || []),
|
34
44
|
...((this._nativeSdkInfo && [this._nativeSdkInfo]) || []),
|
35
|
-
|
36
|
-
|
37
|
-
version: SDK_VERSION,
|
38
|
-
},
|
39
|
-
], version: SDK_VERSION });
|
45
|
+
...defaultSdkInfo.packages,
|
46
|
+
] });
|
40
47
|
return event;
|
41
48
|
});
|
42
49
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../../src/integrations/sdkinfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../../src/integrations/sdkinfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAC,WAAW,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC1C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACN;YACI,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,WAAW;SACvB;KACJ;IACD,OAAO,EAAE,WAAW;CACvB,CAAC;AAEF,sCAAsC;AACtC,MAAM,OAAO,OAAO;IAApB;QAMI;;SAEC;QACM,SAAI,GAAW,OAAO,CAAC,EAAE,CAAC;QAEzB,mBAAc,GAAmB,IAAI,CAAC;IAmClD,CAAC;IAjCG;;KAEC;IACM,SAAS,CAAC,uBAAoD;QACjE,uBAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;;YACpC,2GAA2G;YAC3G,+FAA+F;YAC/F,IAAI,OAAO,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE;gBACzC,IAAI;oBACA,IAAI,CAAC,cAAc,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;iBAC3D;gBAAC,OAAO,CAAC,EAAE;oBACR,qGAAqG;oBACrG,MAAM,CAAC,IAAI,CACP,sGAAsG,CACzG,CAAC;oBACF,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBAClB;aACJ;YAED,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,YAAY,CAAC;YAChD,KAAK,CAAC,GAAG,iDACF,CAAC,MAAA,KAAK,CAAC,GAAG,mCAAI,EAAE,CAAC,GACjB,cAAc,KACjB,QAAQ,EAAE;oBACN,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;oBAC5C,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;oBACzD,GAAG,cAAc,CAAC,QAAQ;iBAC7B,GACJ,CAAC;YAEF,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC;;AA5CD;;EAEC;AACa,UAAE,GAAW,SAAS,CAAC"}
|
package/measurement.d.ts
ADDED
package/measurement.js
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
import { getCurrentHub, getMainCarrier } from '@sentry/hub';
|
2
|
+
import { NativescriptTracing } from './tracing';
|
3
|
+
/**
|
4
|
+
* Adds React Native's extensions. Needs to be called after @sentry/tracing's extension methods are added
|
5
|
+
*/
|
6
|
+
export function _addTracingExtensions() {
|
7
|
+
const carrier = getMainCarrier();
|
8
|
+
if (carrier.__SENTRY__) {
|
9
|
+
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
|
10
|
+
if (carrier.__SENTRY__.extensions.startTransaction) {
|
11
|
+
const originalStartTransaction = carrier.__SENTRY__.extensions
|
12
|
+
.startTransaction;
|
13
|
+
/*
|
14
|
+
Overwrites the transaction start and finish to start and finish stall tracking.
|
15
|
+
Preferably instead of overwriting add a callback method for this in the Transaction itself.
|
16
|
+
*/
|
17
|
+
const _startTransaction = _patchStartTransaction(originalStartTransaction);
|
18
|
+
carrier.__SENTRY__.extensions.startTransaction = _startTransaction;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Overwrite the startTransaction extension method to start and end stall tracking.
|
24
|
+
*/
|
25
|
+
const _patchStartTransaction = (originalStartTransaction) => {
|
26
|
+
/**
|
27
|
+
* Method to overwrite with
|
28
|
+
*/
|
29
|
+
function _startTransaction(transactionContext, customSamplingContext) {
|
30
|
+
const transaction = originalStartTransaction.apply(this, [
|
31
|
+
transactionContext,
|
32
|
+
customSamplingContext,
|
33
|
+
]);
|
34
|
+
const reactNativeTracing = getCurrentHub().getIntegration(NativescriptTracing);
|
35
|
+
if (reactNativeTracing) {
|
36
|
+
reactNativeTracing.onTransactionStart(transaction);
|
37
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
38
|
+
const originalFinish = transaction.finish;
|
39
|
+
transaction.finish = (endTimestamp) => {
|
40
|
+
if (reactNativeTracing) {
|
41
|
+
reactNativeTracing.onTransactionFinish(transaction);
|
42
|
+
}
|
43
|
+
return originalFinish.apply(transaction, [endTimestamp]);
|
44
|
+
};
|
45
|
+
}
|
46
|
+
return transaction;
|
47
|
+
}
|
48
|
+
return _startTransaction;
|
49
|
+
};
|
50
|
+
//# sourceMappingURL=measurement.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"measurement.js","sourceRoot":"","sources":["../src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mB,CAAC,WAAW,CAAC,CAAC;iBACvD;gBAED,OAAO,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAC7D,CAAC,CAAC;SACL;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC7B,CAAC,CAAC"}
|
package/measurements.js
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
import { getCurrentHub, getMainCarrier } from '@sentry/hub';
|
2
|
+
import { NativescriptTracing } from './tracing';
|
3
|
+
/**
|
4
|
+
* Adds React Native's extensions. Needs to be called after @sentry/tracing's extension methods are added
|
5
|
+
*/
|
6
|
+
export function _addTracingExtensions() {
|
7
|
+
const carrier = getMainCarrier();
|
8
|
+
if (carrier.__SENTRY__) {
|
9
|
+
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
|
10
|
+
if (carrier.__SENTRY__.extensions.startTransaction) {
|
11
|
+
const originalStartTransaction = carrier.__SENTRY__.extensions
|
12
|
+
.startTransaction;
|
13
|
+
/*
|
14
|
+
Overwrites the transaction start and finish to start and finish stall tracking.
|
15
|
+
Preferably instead of overwriting add a callback method for this in the Transaction itself.
|
16
|
+
*/
|
17
|
+
const _startTransaction = _patchStartTransaction(originalStartTransaction);
|
18
|
+
carrier.__SENTRY__.extensions.startTransaction = _startTransaction;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Overwrite the startTransaction extension method to start and end stall tracking.
|
24
|
+
*/
|
25
|
+
const _patchStartTransaction = (originalStartTransaction) => {
|
26
|
+
/**
|
27
|
+
* Method to overwrite with
|
28
|
+
*/
|
29
|
+
function _startTransaction(transactionContext, customSamplingContext) {
|
30
|
+
const transaction = originalStartTransaction.apply(this, [
|
31
|
+
transactionContext,
|
32
|
+
customSamplingContext,
|
33
|
+
]);
|
34
|
+
const reactNativeTracing = getCurrentHub().getIntegration(NativescriptTracing);
|
35
|
+
if (reactNativeTracing) {
|
36
|
+
reactNativeTracing.onTransactionStart(transaction);
|
37
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
38
|
+
const originalFinish = transaction.finish;
|
39
|
+
transaction.finish = (endTimestamp) => {
|
40
|
+
if (reactNativeTracing) {
|
41
|
+
reactNativeTracing.onTransactionFinish(transaction);
|
42
|
+
}
|
43
|
+
return originalFinish.apply(transaction, [endTimestamp]);
|
44
|
+
};
|
45
|
+
}
|
46
|
+
return transaction;
|
47
|
+
}
|
48
|
+
return _startTransaction;
|
49
|
+
};
|
50
|
+
//# sourceMappingURL=measurements.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"measurements.js","sourceRoot":"","sources":["../src/measurements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACjC,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,UAAU,EAAE;QACpB,OAAO,CAAC,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC;QACpE,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,gBAAgB,EAAE;YAChD,MAAM,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU;iBACzD,gBAA4C,CAAC;YAElD;;;QAGJ;YACI,MAAM,iBAAiB,GAAG,sBAAsB,CAC5C,wBAAwB,CAC3B,CAAC;YAEF,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;SACtE;KACJ;AACL,CAAC;AAQD;;GAEG;AACH,MAAM,sBAAsB,GAAG,CAC3B,wBAAkD,EAC1B,EAAE;IAC1B;;KAEC;IACD,SAAS,iBAAiB,CAEtB,kBAAsC,EACtC,qBAA6C;QAE7C,MAAM,WAAW,GAAgB,wBAAwB,CAAC,KAAK,CAAC,IAAI,EAAE;YAClE,kBAAkB;YAClB,qBAAqB;SACxB,CAAC,CAAC;QAEH,MAAM,kBAAkB,GAAG,aAAa,EAAE,CAAC,cAAc,CACrD,mBAAmB,CACtB,CAAC;QAEF,IAAI,kBAAkB,EAAE;YACpB,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YAEnD,6DAA6D;YAC7D,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC;YAE1C,WAAW,CAAC,MAAM,GAAG,CAAC,YAAgC,EAAE,EAAE;gBACtD,IAAI,kBAAkB,EAAE;oBACpB,kBAAkB,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;iBACvD;gBAED,OAAO,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAC7D,CAAC,CAAC;SACL;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC7B,CAAC,CAAC"}
|
package/misc.d.ts
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
import { EnvelopeItem } from '@sentry/types';
|
2
|
+
declare type EnvelopeItemPayload = EnvelopeItem[1];
|
3
|
+
/**
|
4
|
+
* Extracts the hard crash information from the event exceptions.
|
5
|
+
* No exceptions or undefined handled are not hard crashes.
|
6
|
+
*/
|
7
|
+
export declare function isHardCrash(payload: EnvelopeItemPayload): boolean;
|
8
|
+
export {};
|
package/misc.js
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Extracts the hard crash information from the event exceptions.
|
3
|
+
* No exceptions or undefined handled are not hard crashes.
|
4
|
+
*/
|
5
|
+
export function isHardCrash(payload) {
|
6
|
+
var _a, _b;
|
7
|
+
const values = typeof payload !== 'string' && 'exception' in payload && ((_a = payload.exception) === null || _a === void 0 ? void 0 : _a.values)
|
8
|
+
? payload.exception.values
|
9
|
+
: [];
|
10
|
+
for (const exception of values) {
|
11
|
+
if (!(((_b = exception.mechanism) === null || _b === void 0 ? void 0 : _b.handled) !== false)) {
|
12
|
+
return true;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
return false;
|
16
|
+
}
|
17
|
+
//# sourceMappingURL=misc.js.map
|
package/misc.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../src/misc.ts"],"names":[],"mappings":"AAOA;;;KAGK;AACL,MAAM,UAAU,WAAW,CAAC,OAA4B;;IACpD,MAAM,MAAM,GAAgB,OAAO,OAAO,KAAK,QAAQ,IAAI,WAAW,IAAI,OAAO,KAAI,MAAA,OAAO,CAAC,SAAS,0CAAE,MAAM,CAAA;QAC1G,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM;QAC1B,CAAC,CAAC,EAAE,CAAC;IACT,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE;QAC5B,IAAI,CAAC,CAAC,CAAA,MAAA,SAAS,CAAC,SAAS,0CAAE,OAAO,MAAK,KAAK,CAAC,EAAE;YAC3C,OAAO,IAAI,CAAC;SACf;KACJ;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
package/options.d.ts
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
import { BaseBrowserOptions } from '@sentry/browser/types/client';
|
2
|
+
import { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
|
3
|
+
import { ClientOptions, Options } from '@sentry/types';
|
4
|
+
import { CaptureContext } from '@sentry/types/types/scope';
|
5
|
+
import { NativescriptErrorHandlersOptions } from './integrations/nativescripterrorhandlers';
|
6
|
+
/**
|
7
|
+
* Configuration options for the Sentry Nativescript SDK.
|
8
|
+
* @see NativescriptFrontend for more information.
|
9
|
+
*/
|
10
|
+
export interface BaseNativescriptOptions {
|
11
|
+
/**
|
12
|
+
* Enables native transport + device info + offline caching.
|
13
|
+
* Be careful, disabling this also breaks automatic release setting.
|
14
|
+
* This means you have to manage setting the release yourself.
|
15
|
+
* Defaults to `true`.
|
16
|
+
*/
|
17
|
+
enableNative?: boolean;
|
18
|
+
/**
|
19
|
+
* Enables native crashHandling. This only works if `enableNative` is `true`.
|
20
|
+
* Defaults to `true`.
|
21
|
+
*/
|
22
|
+
enableNativeCrashHandling?: boolean;
|
23
|
+
/**
|
24
|
+
* Initializes the native SDK on init.
|
25
|
+
* Set this to `false` if you have an existing native SDK and don't want to re-initialize.
|
26
|
+
*
|
27
|
+
* NOTE: Be careful and only use this if you know what you are doing.
|
28
|
+
* If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.
|
29
|
+
* Also, make sure the DSN on both the React Native side and the native side are the same one.
|
30
|
+
* We strongly recommend checking the documentation if you need to use this.
|
31
|
+
*
|
32
|
+
* @default true
|
33
|
+
*/
|
34
|
+
autoInitializeNativeSdk?: boolean;
|
35
|
+
/** Should the native nagger alert be shown or not. */
|
36
|
+
enableNativeNagger?: boolean;
|
37
|
+
/** Should sessions be tracked to Sentry Health or not. */
|
38
|
+
enableAutoSessionTracking?: boolean;
|
39
|
+
/** The interval to end a session if the App goes to the background. */
|
40
|
+
sessionTrackingIntervalMillis?: number;
|
41
|
+
/** Enable scope sync from Java to NDK on Android */
|
42
|
+
enableNdkScopeSync?: boolean;
|
43
|
+
/** When enabled, all the threads are automatically attached to all logged events on Android */
|
44
|
+
attachThreads?: boolean;
|
45
|
+
/**
|
46
|
+
* When enabled, certain personally identifiable information (PII) is added by active integrations.
|
47
|
+
*
|
48
|
+
* @default false
|
49
|
+
*/
|
50
|
+
sendDefaultPii?: boolean;
|
51
|
+
/**
|
52
|
+
* Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.
|
53
|
+
*/
|
54
|
+
onReady?: (response: {
|
55
|
+
/** `true` if the native SDK has been initialized, `false` otherwise. */
|
56
|
+
didCallNativeInit: boolean;
|
57
|
+
}) => void;
|
58
|
+
/** Enable auto performance tracking by default. */
|
59
|
+
enableAutoPerformanceTracking?: boolean;
|
60
|
+
/**
|
61
|
+
* Enables Out of Memory Tracking for iOS and macCatalyst.
|
62
|
+
* See the following link for more information and possible restrictions:
|
63
|
+
* https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/
|
64
|
+
*
|
65
|
+
* @default true
|
66
|
+
*/
|
67
|
+
enableOutOfMemoryTracking?: boolean;
|
68
|
+
/**
|
69
|
+
* Set data to the inital scope
|
70
|
+
* @deprecated Use `Sentry.configureScope(...)`
|
71
|
+
*/
|
72
|
+
initialScope?: CaptureContext;
|
73
|
+
/**
|
74
|
+
* The max cache items for capping the number of envelopes.
|
75
|
+
*
|
76
|
+
* @default 30
|
77
|
+
*/
|
78
|
+
maxCacheItems?: number;
|
79
|
+
/**
|
80
|
+
* When enabled, the SDK tracks when the application stops responding for a specific amount of
|
81
|
+
* time defined by the `appHangTimeoutInterval` option.
|
82
|
+
*
|
83
|
+
* iOS only
|
84
|
+
*
|
85
|
+
* @default true
|
86
|
+
*/
|
87
|
+
enableAppHangTracking?: boolean;
|
88
|
+
/**
|
89
|
+
* The minimum amount of time an app should be unresponsive to be classified as an App Hanging.
|
90
|
+
* The actual amount may be a little longer.
|
91
|
+
* Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.
|
92
|
+
* Value should be in seconds.
|
93
|
+
*
|
94
|
+
* iOS only
|
95
|
+
*
|
96
|
+
* @default 2
|
97
|
+
*/
|
98
|
+
appHangsTimeoutInterval?: number;
|
99
|
+
}
|
100
|
+
/**
|
101
|
+
* Configuration options for the Sentry ReactNative SDK.
|
102
|
+
* @see ReactNativeFrontend for more information.
|
103
|
+
*/
|
104
|
+
export interface NativescriptOptions extends Options<BrowserTransportOptions>, BaseBrowserOptions, BaseNativescriptOptions, NativescriptErrorHandlersOptions {
|
105
|
+
headers?: {
|
106
|
+
[k: string]: string;
|
107
|
+
};
|
108
|
+
/**
|
109
|
+
* Optional prefix to add while rewriting frames
|
110
|
+
*/
|
111
|
+
appPrefix?: string;
|
112
|
+
flushSendEvent?: boolean;
|
113
|
+
breadcrumbs?: {
|
114
|
+
console?: boolean;
|
115
|
+
dom?: boolean;
|
116
|
+
fetch?: boolean;
|
117
|
+
history?: boolean;
|
118
|
+
sentry?: boolean;
|
119
|
+
xhr?: boolean;
|
120
|
+
};
|
121
|
+
}
|
122
|
+
export interface NativescriptClientOptions extends ClientOptions<BrowserTransportOptions>, BaseBrowserOptions, BaseNativescriptOptions {
|
123
|
+
}
|
124
|
+
export interface NativescriptWrapperOptions {
|
125
|
+
}
|
package/options.js
ADDED
package/options.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/sentry",
|
3
|
-
"version": "
|
3
|
+
"version": "4.6.1",
|
4
4
|
"description": "A cross-platform application monitoring tool, with a focus on error reporting.",
|
5
5
|
"main": "./index",
|
6
6
|
"typings": "./index.d.ts",
|
@@ -32,17 +32,14 @@
|
|
32
32
|
"url": "https://github.com/nativescript-community/sentry"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@sentry/browser": "
|
36
|
-
"@sentry/
|
37
|
-
"@sentry/
|
38
|
-
"@sentry/
|
39
|
-
"@sentry/
|
40
|
-
"@sentry/
|
41
|
-
"@sentry/
|
42
|
-
"@sentry/types": "6.12.0",
|
43
|
-
"@sentry/utils": "6.12.0",
|
44
|
-
"@sentry/wizard": "^1.2.17",
|
35
|
+
"@sentry/browser": "7.15.0",
|
36
|
+
"@sentry/core": "7.15.0",
|
37
|
+
"@sentry/hub": "7.15.0",
|
38
|
+
"@sentry/integrations": "7.15.0",
|
39
|
+
"@sentry/tracing": "7.15.0",
|
40
|
+
"@sentry/types": "7.15.0",
|
41
|
+
"@sentry/utils": "7.15.0",
|
45
42
|
"stacktrace-parser": "^0.1.10"
|
46
43
|
},
|
47
|
-
"gitHead": "
|
44
|
+
"gitHead": "d724afd6b0722e085e449ec7ce6b542f72efe8e4"
|
48
45
|
}
|