@sentry/react-native 3.3.4 → 3.4.0
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 +15 -0
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/dist/js/backend.d.ts +4 -4
- package/dist/js/backend.js +10 -10
- package/dist/js/backend.js.map +1 -1
- package/dist/js/client.d.ts +3 -3
- package/dist/js/client.js +3 -3
- package/dist/js/client.js.map +1 -1
- package/dist/js/definitions.d.ts +2 -2
- package/dist/js/definitions.js.map +1 -1
- package/dist/js/index.d.ts +12 -12
- package/dist/js/index.js +12 -12
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts +1 -1
- package/dist/js/integrations/debugsymbolicator.js +17 -17
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/devicecontext.d.ts +1 -1
- package/dist/js/integrations/devicecontext.js +4 -4
- package/dist/js/integrations/devicecontext.js.map +1 -1
- package/dist/js/integrations/eventorigin.d.ts +1 -1
- package/dist/js/integrations/eventorigin.js +3 -3
- package/dist/js/integrations/eventorigin.js.map +1 -1
- package/dist/js/integrations/index.d.ts +6 -6
- package/dist/js/integrations/index.js +6 -6
- package/dist/js/integrations/index.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +21 -21
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/release.d.ts +1 -1
- package/dist/js/integrations/release.d.ts.map +1 -1
- package/dist/js/integrations/release.js +15 -11
- package/dist/js/integrations/release.js.map +1 -1
- package/dist/js/integrations/sdkinfo.d.ts +1 -1
- package/dist/js/integrations/sdkinfo.js +8 -8
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/measurements.js +2 -2
- package/dist/js/measurements.js.map +1 -1
- package/dist/js/options.d.ts +4 -4
- package/dist/js/options.js.map +1 -1
- package/dist/js/scope.d.ts +2 -2
- package/dist/js/scope.js +2 -2
- package/dist/js/scope.js.map +1 -1
- package/dist/js/sdk.d.ts +2 -2
- package/dist/js/sdk.js +28 -28
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/touchevents.d.ts +1 -1
- package/dist/js/touchevents.js +14 -14
- package/dist/js/touchevents.js.map +1 -1
- package/dist/js/tracing/index.d.ts +7 -7
- package/dist/js/tracing/index.js +6 -6
- package/dist/js/tracing/index.js.map +1 -1
- package/dist/js/tracing/nativeframes.d.ts +2 -2
- package/dist/js/tracing/nativeframes.js +6 -6
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/tracing/reactnativenavigation.d.ts +4 -4
- package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnativenavigation.js +6 -6
- package/dist/js/tracing/reactnativenavigation.js.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.d.ts +1 -1
- package/dist/js/tracing/reactnativeprofiler.js +3 -3
- package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +7 -7
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +18 -18
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/reactnavigation.d.ts +3 -3
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js +17 -17
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/reactnavigationv4.d.ts +3 -3
- package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigationv4.js +17 -17
- package/dist/js/tracing/reactnavigationv4.js.map +1 -1
- package/dist/js/tracing/routingInstrumentation.d.ts +3 -3
- package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
- package/dist/js/tracing/routingInstrumentation.js +1 -1
- package/dist/js/tracing/routingInstrumentation.js.map +1 -1
- package/dist/js/tracing/stalltracking.d.ts +2 -2
- package/dist/js/tracing/stalltracking.js +8 -8
- package/dist/js/tracing/stalltracking.js.map +1 -1
- package/dist/js/tracing/types.d.ts +4 -3
- package/dist/js/tracing/types.d.ts.map +1 -1
- package/dist/js/tracing/types.js.map +1 -1
- package/dist/js/tracing/utils.d.ts +2 -2
- package/dist/js/tracing/utils.js +6 -6
- package/dist/js/tracing/utils.js.map +1 -1
- package/dist/js/transports/native.d.ts +2 -2
- package/dist/js/transports/native.js +2 -2
- package/dist/js/transports/native.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +2 -2
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +4 -4
- package/dist/js/wrapper.js +19 -19
- package/dist/js/wrapper.js.map +1 -1
- package/package.json +13 -13
- package/react-native.config.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
### Various fixes & improvements
|
|
6
|
+
|
|
7
|
+
- Bump: @sentry/javascript dependencies to 6.19.2 (#2175) by @marandaneto
|
|
8
|
+
|
|
9
|
+
## 3.3.6
|
|
10
|
+
|
|
11
|
+
- fix: Respect given release if no dist is given during SDK init (#2163)
|
|
12
|
+
- Bump: @sentry/javascript dependencies to 6.19.2 (#2175)
|
|
13
|
+
|
|
14
|
+
## 3.3.5
|
|
15
|
+
|
|
16
|
+
- Bump: Sentry Cocoa to 7.11.0 and Sentry Android to 5.7.0 (#2160)
|
|
17
|
+
|
|
3
18
|
## 3.3.4
|
|
4
19
|
|
|
5
20
|
- fix(android): setContext serializes as context for Android instead of extra (#2155)
|
package/RNSentry.podspec
CHANGED
package/android/build.gradle
CHANGED
package/dist/js/backend.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseBackend } from
|
|
2
|
-
import { BrowserOptions } from
|
|
3
|
-
import { Event, EventHint, Severity, Transport } from
|
|
4
|
-
import { ReactNativeOptions } from
|
|
1
|
+
import { BaseBackend } from '@sentry/core';
|
|
2
|
+
import { BrowserOptions } from '@sentry/react';
|
|
3
|
+
import { Event, EventHint, Severity, Transport } from '@sentry/types';
|
|
4
|
+
import { ReactNativeOptions } from './options';
|
|
5
5
|
/** The Sentry ReactNative SDK Backend. */
|
|
6
6
|
export declare class ReactNativeBackend extends BaseBackend<BrowserOptions> {
|
|
7
7
|
protected readonly _options: ReactNativeOptions;
|
package/dist/js/backend.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { BrowserBackend } from
|
|
3
|
-
import { BaseBackend, NoopTransport } from
|
|
4
|
-
import { Transports } from
|
|
5
|
-
import { Severity } from
|
|
2
|
+
import { BrowserBackend } from '@sentry/browser/dist/backend';
|
|
3
|
+
import { BaseBackend, NoopTransport } from '@sentry/core';
|
|
4
|
+
import { Transports } from '@sentry/react';
|
|
5
|
+
import { Severity } from '@sentry/types';
|
|
6
6
|
// @ts-ignore LogBox introduced in RN 0.63
|
|
7
|
-
import { Alert, LogBox, YellowBox } from
|
|
8
|
-
import { NativeTransport } from
|
|
9
|
-
import { NATIVE } from
|
|
7
|
+
import { Alert, LogBox, YellowBox } from 'react-native';
|
|
8
|
+
import { NativeTransport } from './transports/native';
|
|
9
|
+
import { NATIVE } from './wrapper';
|
|
10
10
|
/** The Sentry ReactNative SDK Backend. */
|
|
11
11
|
export class ReactNativeBackend extends BaseBackend {
|
|
12
12
|
/** Creates a new ReactNative backend instance. */
|
|
@@ -18,11 +18,11 @@ export class ReactNativeBackend extends BaseBackend {
|
|
|
18
18
|
// YellowBox deprecated and replaced with with LogBox in RN 0.63
|
|
19
19
|
if (LogBox) {
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
21
|
-
LogBox.ignoreLogs([
|
|
21
|
+
LogBox.ignoreLogs(['Require cycle:']);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
// eslint-disable-next-line deprecation/deprecation
|
|
25
|
-
YellowBox.ignoreWarnings([
|
|
25
|
+
YellowBox.ignoreWarnings(['Require cycle:']);
|
|
26
26
|
}
|
|
27
27
|
void this._initNativeSdk();
|
|
28
28
|
}
|
|
@@ -85,7 +85,7 @@ export class ReactNativeBackend extends BaseBackend {
|
|
|
85
85
|
*/
|
|
86
86
|
_showCannotConnectDialog() {
|
|
87
87
|
if (__DEV__ && this._options.enableNativeNagger) {
|
|
88
|
-
Alert.alert(
|
|
88
|
+
Alert.alert('Sentry', 'Warning, could not connect to Sentry native SDK.\nIf you do not want to use the native component please pass `enableNative: false` in the options.\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.');
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
package/dist/js/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/js/backend.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAoB,QAAQ,EAAa,MAAM,eAAe,CAAC;AACtE,0CAA0C;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,0CAA0C;AAC1C,MAAM,OAAO,kBAAmB,SAAQ,WAA2B;IAGjE,kDAAkD;IAClD,YAAsC,QAA4B;QAChE,KAAK,CAAC,QAAQ,CAAC,CAAC;QADoB,aAAQ,GAAR,QAAQ,CAAoB;QAEhE,IAAI,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AC,CAAC;SACtD;QAED,IAAI,MAAM,CAAC,0BAA0B,EAAE,EAAE;YACvC,OAAO,IAAI,eAAe,EAAE,CAAC;SAC9B;QAED,OAAO,IAAI,UAAU,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACW,cAAc;;;YAC1B,IAAI,iBAAiB,GAAG,KAAK,CAAC;YAE9B,IAAI;gBACF,iBAAiB,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAEhC,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;gBAEtD,OAAO;aACR;YAED,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,EAAE;;KAChD;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,qOAAqO,CACtO,CAAC;SACH;IACH,CAAC;CACF","sourcesContent":["import { BrowserBackend } from '@sentry/browser/dist/backend';\nimport { BaseBackend, NoopTransport } from '@sentry/core';\nimport { BrowserOptions, Transports } from '@sentry/react';\nimport { Event, EventHint, Severity, Transport } from '@sentry/types';\n// @ts-ignore LogBox introduced in RN 0.63\nimport { Alert, LogBox, YellowBox } from 'react-native';\n\nimport { ReactNativeOptions } from './options';\nimport { NativeTransport } from './transports/native';\nimport { NATIVE } from './wrapper';\n\n/** The Sentry ReactNative SDK Backend. */\nexport class ReactNativeBackend extends BaseBackend<BrowserOptions> {\n private readonly _browserBackend: BrowserBackend;\n\n /** Creates a new ReactNative backend instance. */\n public constructor(protected readonly _options: ReactNativeOptions) {\n super(_options);\n this._browserBackend = new BrowserBackend(_options);\n\n // This is a workaround for now using fetch on RN, this is a known issue in react-native and only generates a warning\n // YellowBox deprecated and replaced with with LogBox in RN 0.63\n if (LogBox) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n LogBox.ignoreLogs(['Require cycle:']);\n } else {\n // eslint-disable-next-line deprecation/deprecation\n YellowBox.ignoreWarnings(['Require cycle:']);\n }\n\n void this._initNativeSdk();\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(\n exception: unknown,\n hint?: EventHint\n ): PromiseLike<Event> {\n return this._browserBackend.eventFromException(exception, hint);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: string,\n level: Severity = Severity.Info,\n hint?: EventHint\n ): PromiseLike<Event> {\n return this._browserBackend.eventFromMessage(message, level, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return new NoopTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n\n if (NATIVE.isNativeTransportAvailable()) {\n return new NativeTransport();\n }\n\n return new Transports.FetchTransport(transportOptions);\n }\n\n /**\n * Starts native client with dsn and options\n */\n private async _initNativeSdk(): Promise<void> {\n let didCallNativeInit = false;\n\n try {\n didCallNativeInit = await NATIVE.initNativeSdk(this._options);\n } catch (_) {\n this._showCannotConnectDialog();\n\n this._options.onReady?.({ didCallNativeInit: false });\n\n return;\n }\n\n this._options.onReady?.({ didCallNativeInit });\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.'\n );\n }\n }\n}\n"]}
|
package/dist/js/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseClient } from
|
|
2
|
-
import { ReactNativeBackend } from
|
|
3
|
-
import { ReactNativeOptions } from
|
|
1
|
+
import { BaseClient } from '@sentry/core';
|
|
2
|
+
import { ReactNativeBackend } from './backend';
|
|
3
|
+
import { ReactNativeOptions } from './options';
|
|
4
4
|
/**
|
|
5
5
|
* The Sentry React Native SDK Client.
|
|
6
6
|
*
|
package/dist/js/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseClient } from
|
|
2
|
-
import { ReactNativeBackend } from
|
|
3
|
-
import { NATIVE } from
|
|
1
|
+
import { BaseClient } from '@sentry/core';
|
|
2
|
+
import { ReactNativeBackend } from './backend';
|
|
3
|
+
import { NATIVE } from './wrapper';
|
|
4
4
|
/**
|
|
5
5
|
* The Sentry React Native SDK Client.
|
|
6
6
|
*
|
package/dist/js/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAGtC;IACC;;;OAGG;IACH,YAAmB,OAA2B;QAC5C,KAAK,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACI,WAAW;QAChB,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,KAAK;QACV,oGAAoG;QACpG,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,MAAe,EAAE,EAAE;YAC5C,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAyB,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { BaseClient } from
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAGtC;IACC;;;OAGG;IACH,YAAmB,OAA2B;QAC5C,KAAK,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACI,WAAW;QAChB,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,KAAK;QACV,oGAAoG;QACpG,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,MAAe,EAAE,EAAE;YAC5C,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAyB,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { BaseClient } from '@sentry/core';\n\nimport { ReactNativeBackend } from './backend';\nimport { ReactNativeOptions } from './options';\nimport { NATIVE } from './wrapper';\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends BaseClient<\n ReactNativeBackend,\n ReactNativeOptions\n> {\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeOptions) {\n super(ReactNativeBackend, options);\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n this._getBackend().nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n}\n"]}
|
package/dist/js/definitions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Breadcrumb, Package } from
|
|
2
|
-
import { ReactNativeOptions } from
|
|
1
|
+
import { Breadcrumb, Package } from '@sentry/types';
|
|
2
|
+
import { ReactNativeOptions } from './options';
|
|
3
3
|
export declare type NativeAppStartResponse = {
|
|
4
4
|
isColdStart: boolean;
|
|
5
5
|
appStartTime: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/js/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, Package } from
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/js/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, Package } from '@sentry/types';\n\nimport { ReactNativeOptions } from './options';\n\nexport type NativeAppStartResponse = {\n isColdStart: boolean;\n appStartTime: number;\n didFetchAppStart: boolean;\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\nexport type NativeDeviceContextsResponse = {\n [key: string]: Record<string, unknown>;\n};\n\ninterface SerializedObject {\n [key: string]: string;\n}\n\nexport interface SentryNativeBridgeModule {\n nativeClientAvailable: boolean;\n\n addBreadcrumb(breadcrumb: Breadcrumb): void;\n captureEnvelope(\n payload:\n | string\n | {\n header: Record<string, unknown>;\n payload: Record<string, unknown>;\n }\n ): PromiseLike<boolean>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): PromiseLike<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<{\n build: string;\n id: string;\n version: string;\n }>;\n fetchNativeSdkInfo(): PromiseLike<Package>;\n fetchNativeDeviceContexts(): PromiseLike<NativeDeviceContextsResponse>;\n fetchNativeAppStart(): PromiseLike<NativeAppStartResponse | null>;\n fetchNativeFrames(): PromiseLike<NativeFramesResponse | null>;\n getStringBytesLength(str: string): Promise<number>;\n initNativeSdk(options: ReactNativeOptions): Promise<boolean>;\n setUser(\n defaultUserKeys: SerializedObject | null,\n otherUserKeys: SerializedObject | null\n ): void;\n setContext(key: string, value: SerializedObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n}\n"]}
|
package/dist/js/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, EventStatus, Thread, User, } from
|
|
2
|
-
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, } from
|
|
3
|
-
import
|
|
4
|
-
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from
|
|
5
|
-
import * as Integrations from
|
|
6
|
-
import { SDK_NAME, SDK_VERSION } from
|
|
7
|
-
export { ReactNativeBackend } from
|
|
8
|
-
export { ReactNativeOptions } from
|
|
9
|
-
export { ReactNativeClient } from
|
|
10
|
-
export { init, wrap, setDist, setRelease, nativeCrash, flush, close, } from
|
|
11
|
-
export { TouchEventBoundary, withTouchEventBoundary } from
|
|
12
|
-
export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, ReactNavigationTransactionContext, } from
|
|
1
|
+
export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, EventStatus, Thread, User, } from '@sentry/types';
|
|
2
|
+
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, } from '@sentry/core';
|
|
3
|
+
import '@sentry/tracing';
|
|
4
|
+
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
5
|
+
import * as Integrations from './integrations';
|
|
6
|
+
import { SDK_NAME, SDK_VERSION } from './version';
|
|
7
|
+
export { ReactNativeBackend } from './backend';
|
|
8
|
+
export { ReactNativeOptions } from './options';
|
|
9
|
+
export { ReactNativeClient } from './client';
|
|
10
|
+
export { init, wrap, setDist, setRelease, nativeCrash, flush, close, } from './sdk';
|
|
11
|
+
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
12
|
+
export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, ReactNavigationTransactionContext, } from './tracing';
|
|
13
13
|
export { Integrations, SDK_NAME, SDK_VERSION };
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/js/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { Severity, } from
|
|
2
|
-
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, } from
|
|
1
|
+
export { Severity, } from '@sentry/types';
|
|
2
|
+
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, } from '@sentry/core';
|
|
3
3
|
// We need to import it so we patch the hub with global functions
|
|
4
4
|
// aka. this has side effects
|
|
5
|
-
import
|
|
5
|
+
import '@sentry/tracing';
|
|
6
6
|
// Add the React Native SDK's own tracing extensions, this needs to happen AFTER @sentry/tracing's
|
|
7
|
-
import { _addTracingExtensions } from
|
|
7
|
+
import { _addTracingExtensions } from './measurements';
|
|
8
8
|
_addTracingExtensions();
|
|
9
|
-
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from
|
|
10
|
-
import * as Integrations from
|
|
11
|
-
import { SDK_NAME, SDK_VERSION } from
|
|
12
|
-
export { ReactNativeBackend } from
|
|
13
|
-
export { ReactNativeClient } from
|
|
9
|
+
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
10
|
+
import * as Integrations from './integrations';
|
|
11
|
+
import { SDK_NAME, SDK_VERSION } from './version';
|
|
12
|
+
export { ReactNativeBackend } from './backend';
|
|
13
|
+
export { ReactNativeClient } from './client';
|
|
14
14
|
export { init, wrap,
|
|
15
15
|
// eslint-disable-next-line deprecation/deprecation
|
|
16
16
|
setDist,
|
|
17
17
|
// eslint-disable-next-line deprecation/deprecation
|
|
18
|
-
setRelease, nativeCrash, flush, close, } from
|
|
19
|
-
export { TouchEventBoundary, withTouchEventBoundary } from
|
|
18
|
+
setRelease, nativeCrash, flush, close, } from './sdk';
|
|
19
|
+
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
20
20
|
export { ReactNativeTracing, ReactNavigationV4Instrumentation,
|
|
21
21
|
// eslint-disable-next-line deprecation/deprecation
|
|
22
|
-
ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, } from
|
|
22
|
+
ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, } from './tracing';
|
|
23
23
|
export { Integrations, SDK_NAME, SDK_VERSION };
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
package/dist/js/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,QAAQ,GAMT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,iEAAiE;AACjE,6BAA6B;AAC7B,OAAO,iBAAiB,CAAC;AAEzB,kGAAkG;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,qBAAqB,EAAE,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI;AACJ,mDAAmD;AACnD,OAAO;AACP,mDAAmD;AACnD,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC;AAChC,mDAAmD;AACnD,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,GAEvB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n EventStatus,\n Thread,\n User,\n} from
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,QAAQ,GAMT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,iEAAiE;AACjE,6BAA6B;AAC7B,OAAO,iBAAiB,CAAC;AAEzB,kGAAkG;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,qBAAqB,EAAE,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI;AACJ,mDAAmD;AACnD,OAAO;AACP,mDAAmD;AACnD,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC;AAChC,mDAAmD;AACnD,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,GAEvB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n Response,\n Severity,\n StackFrame,\n Stacktrace,\n EventStatus,\n Thread,\n User,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n configureScope,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startTransaction,\n withScope,\n} from '@sentry/core';\n\n// We need to import it so we patch the hub with global functions\n// aka. this has side effects\nimport '@sentry/tracing';\n\n// Add the React Native SDK's own tracing extensions, this needs to happen AFTER @sentry/tracing's\nimport { _addTracingExtensions } from './measurements';\n_addTracingExtensions();\n\nexport {\n Integrations as BrowserIntegrations,\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nimport * as Integrations from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\nexport { ReactNativeBackend } from './backend';\nexport { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport {\n init,\n wrap,\n // eslint-disable-next-line deprecation/deprecation\n setDist,\n // eslint-disable-next-line deprecation/deprecation\n setRelease,\n nativeCrash,\n flush,\n close,\n} from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n ReactNativeTracing,\n ReactNavigationV4Instrumentation,\n // eslint-disable-next-line deprecation/deprecation\n ReactNavigationV5Instrumentation,\n ReactNavigationInstrumentation,\n ReactNativeNavigationInstrumentation,\n RoutingInstrumentation,\n ReactNavigationTransactionContext,\n} from './tracing';\n\nexport { Integrations, SDK_NAME, SDK_VERSION };\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { addGlobalEventProcessor, getCurrentHub } from
|
|
3
|
-
import { addContextToFrame, logger } from
|
|
4
|
-
const INTERNAL_CALLSITES_REGEX = new RegExp([
|
|
2
|
+
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
|
|
3
|
+
import { addContextToFrame, logger } from '@sentry/utils';
|
|
4
|
+
const INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\.js$', 'MessageQueue\\.js$'].join('|'));
|
|
5
5
|
/** Tries to symbolicate the JS stack trace on the device. */
|
|
6
6
|
export class DebugSymbolicator {
|
|
7
7
|
constructor() {
|
|
@@ -21,7 +21,7 @@ export class DebugSymbolicator {
|
|
|
21
21
|
}
|
|
22
22
|
const reactError = hint.originalException;
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
24
|
-
const parseErrorStack = require(
|
|
24
|
+
const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
|
|
25
25
|
let stack;
|
|
26
26
|
try {
|
|
27
27
|
stack = parseErrorStack(reactError);
|
|
@@ -33,7 +33,7 @@ export class DebugSymbolicator {
|
|
|
33
33
|
// Ideally this should go into contexts but android sdk doesn't support it
|
|
34
34
|
event.extra = Object.assign(Object.assign({}, event.extra), { componentStack: reactError.componentStack, jsEngine: reactError.jsEngine });
|
|
35
35
|
yield self._symbolicate(event, stack);
|
|
36
|
-
event.platform =
|
|
36
|
+
event.platform = 'node'; // Setting platform node makes sure we do not show source maps errors
|
|
37
37
|
return event;
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
@@ -45,7 +45,7 @@ export class DebugSymbolicator {
|
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
try {
|
|
47
47
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
48
|
-
const symbolicateStackTrace = require(
|
|
48
|
+
const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');
|
|
49
49
|
const prettyStack = yield symbolicateStackTrace(stack);
|
|
50
50
|
if (prettyStack) {
|
|
51
51
|
let newStack = prettyStack;
|
|
@@ -63,7 +63,7 @@ export class DebugSymbolicator {
|
|
|
63
63
|
this._replaceFramesInEvent(event, symbolicatedFrames);
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
logger.error(
|
|
66
|
+
logger.error('The stack is null');
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
catch (error) {
|
|
@@ -81,7 +81,7 @@ export class DebugSymbolicator {
|
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
82
|
let getDevServer;
|
|
83
83
|
try {
|
|
84
|
-
getDevServer = require(
|
|
84
|
+
getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');
|
|
85
85
|
}
|
|
86
86
|
catch (_oO) {
|
|
87
87
|
// We can't load devserver URL
|
|
@@ -93,22 +93,22 @@ export class DebugSymbolicator {
|
|
|
93
93
|
inApp =
|
|
94
94
|
inApp &&
|
|
95
95
|
frame.file !== undefined &&
|
|
96
|
-
!frame.file.includes(
|
|
97
|
-
!frame.file.includes(
|
|
96
|
+
!frame.file.includes('node_modules') &&
|
|
97
|
+
!frame.file.includes('native code');
|
|
98
98
|
const newFrame = {
|
|
99
99
|
colno: frame.column,
|
|
100
100
|
filename: frame.file,
|
|
101
101
|
function: frame.methodName,
|
|
102
102
|
in_app: inApp,
|
|
103
103
|
lineno: inApp ? frame.lineNumber : undefined,
|
|
104
|
-
platform: inApp ?
|
|
104
|
+
platform: inApp ? 'javascript' : 'node',
|
|
105
105
|
};
|
|
106
106
|
// The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and
|
|
107
107
|
// leaves a trailing `(address at` in the function name.
|
|
108
108
|
// `react-native@0.62` seems to have custom logic to parse hermes frames specially.
|
|
109
109
|
// Anyway, all we do here is throw away the bogus suffix.
|
|
110
110
|
if (newFrame.function) {
|
|
111
|
-
const addressAtPos = newFrame.function.indexOf(
|
|
111
|
+
const addressAtPos = newFrame.function.indexOf('(address at');
|
|
112
112
|
if (addressAtPos >= 0) {
|
|
113
113
|
newFrame.function = newFrame.function
|
|
114
114
|
.substr(0, addressAtPos)
|
|
@@ -145,12 +145,12 @@ export class DebugSymbolicator {
|
|
|
145
145
|
var _a, _b;
|
|
146
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
147
|
let response;
|
|
148
|
-
const segments = (_b = (_a = frame.filename) === null || _a === void 0 ? void 0 : _a.split(
|
|
148
|
+
const segments = (_b = (_a = frame.filename) === null || _a === void 0 ? void 0 : _a.split('/')) !== null && _b !== void 0 ? _b : [];
|
|
149
149
|
if (getDevServer) {
|
|
150
150
|
for (const idx in segments) {
|
|
151
151
|
if (Object.prototype.hasOwnProperty.call(segments, idx)) {
|
|
152
|
-
response = yield fetch(`${getDevServer().url}${segments.slice(-idx).join(
|
|
153
|
-
method:
|
|
152
|
+
response = yield fetch(`${getDevServer().url}${segments.slice(-idx).join('/')}`, {
|
|
153
|
+
method: 'GET',
|
|
154
154
|
});
|
|
155
155
|
if (response.ok) {
|
|
156
156
|
break;
|
|
@@ -160,7 +160,7 @@ export class DebugSymbolicator {
|
|
|
160
160
|
}
|
|
161
161
|
if (response && response.ok) {
|
|
162
162
|
const content = yield response.text();
|
|
163
|
-
const lines = content.split(
|
|
163
|
+
const lines = content.split('\n');
|
|
164
164
|
addContextToFrame(lines, frame);
|
|
165
165
|
}
|
|
166
166
|
});
|
|
@@ -169,5 +169,5 @@ export class DebugSymbolicator {
|
|
|
169
169
|
/**
|
|
170
170
|
* @inheritDoc
|
|
171
171
|
*/
|
|
172
|
-
DebugSymbolicator.id =
|
|
172
|
+
DebugSymbolicator.id = 'DebugSymbolicator';
|
|
173
173
|
//# sourceMappingURL=debugsymbolicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,wBAAwB,GAAG,IAAI,MAAM,CACzC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAClE,CAAC;AA2BF,6DAA6D;AAC7D,MAAM,OAAO,iBAAiB;IAA9B;QAKE;;WAEG;QACI,SAAI,GAAW,iBAAiB,CAAC,EAAE,CAAC;IAkM7C,CAAC;IAhMC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,IAAgB,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;gBACvE,OAAO,KAAK,CAAC;aACd;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAqC,CAAC;YAE9D,8DAA8D;YAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YAExF,IAAI,KAAK,CAAC;YACV,IAAI;gBACF,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;aACrC;YAAC,OAAO,CAAC,EAAE;gBACV,uDAAuD;gBACvD,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,KAA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AAC,EAAE,EACxD;4BACE,MAAM,EAAE,KAAK;yBACd,CACF,CAAC;wBAEF,IAAI,QAAQ,CAAC,EAAE,EAAE;4BACf,MAAM;yBACP;qBACF;iBACF;aACF;YAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,EAAE;gBAC3B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAElC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACjC;;KACF;;AAxMD;;GAEG;AACW,oBAAE,GAAW,mBAAmB,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from \"@sentry/core\";\nimport { Event, EventHint, Integration, StackFrame } from \"@sentry/types\";\nimport { addContextToFrame, logger } from \"@sentry/utils\";\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(\n [\"ReactNativeRenderer-dev\\\\.js$\", \"MessageQueue\\\\.js$\"].join(\"|\")\n);\n\ninterface GetDevServer {\n (): { url: string };\n}\n\n/**\n * React Native Stack Frame\n */\ninterface ReactNativeFrame {\n // arguments: []\n column: number;\n file: string;\n lineNumber: number;\n methodName: string;\n}\n\n/**\n * React Native Error\n */\ntype ReactNativeError = Error & {\n framesToPop?: number;\n jsEngine?: string;\n preventSymbolication?: boolean;\n componentStack?: string;\n};\n\n/** Tries to symbolicate the JS stack trace on the device. */\nexport class DebugSymbolicator implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = \"DebugSymbolicator\";\n /**\n * @inheritDoc\n */\n public name: string = DebugSymbolicator.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(DebugSymbolicator);\n\n if (!self || hint === undefined || hint.originalException === undefined) {\n return event;\n }\n\n const reactError = hint.originalException as ReactNativeError;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parseErrorStack = require(\"react-native/Libraries/Core/Devtools/parseErrorStack\");\n\n let stack;\n try {\n stack = parseErrorStack(reactError);\n } catch (e) {\n // In RN 0.64 `parseErrorStack` now only takes a string\n stack = parseErrorStack(reactError.stack);\n }\n\n // Ideally this should go into contexts but android sdk doesn't support it\n event.extra = {\n ...event.extra,\n componentStack: reactError.componentStack,\n jsEngine: reactError.jsEngine,\n };\n\n await self._symbolicate(event, stack);\n\n event.platform = \"node\"; // Setting platform node makes sure we do not show source maps errors\n\n return event;\n });\n }\n\n /**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\n private async _symbolicate(\n event: Event,\n stack: string | undefined\n ): Promise<void> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const symbolicateStackTrace = require(\"react-native/Libraries/Core/Devtools/symbolicateStackTrace\");\n const prettyStack = await symbolicateStackTrace(stack);\n\n if (prettyStack) {\n let newStack = prettyStack;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (prettyStack.stack) {\n // This has been changed in an react-native version so stack is contained in here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n newStack = prettyStack.stack;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const stackWithoutInternalCallsites = newStack.filter(\n (frame: { file?: string }) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null\n );\n\n const symbolicatedFrames = await this._convertReactNativeFramesToSentryFrames(\n stackWithoutInternalCallsites\n );\n this._replaceFramesInEvent(event, symbolicatedFrames);\n } else {\n logger.error(\"The stack is null\");\n }\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n }\n }\n\n /**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\n private async _convertReactNativeFramesToSentryFrames(\n frames: ReactNativeFrame[]\n ): Promise<StackFrame[]> {\n let getDevServer: GetDevServer;\n try {\n getDevServer = require(\"react-native/Libraries/Core/Devtools/getDevServer\");\n } catch (_oO) {\n // We can't load devserver URL\n }\n // Below you will find lines marked with :HACK to prevent showing errors in the sentry ui\n // But since this is a debug only feature: This is Fine (TM)\n return Promise.all(\n frames.map(\n async (frame: ReactNativeFrame): Promise<StackFrame> => {\n let inApp = !!frame.column && !!frame.lineNumber;\n inApp =\n inApp &&\n frame.file !== undefined &&\n !frame.file.includes(\"node_modules\") &&\n !frame.file.includes(\"native code\");\n\n const newFrame: StackFrame = {\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n lineno: inApp ? frame.lineNumber : undefined, // :HACK\n platform: inApp ? \"javascript\" : \"node\", // :HACK\n };\n\n // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and\n // leaves a trailing `(address at` in the function name.\n // `react-native@0.62` seems to have custom logic to parse hermes frames specially.\n // Anyway, all we do here is throw away the bogus suffix.\n if (newFrame.function) {\n const addressAtPos = newFrame.function.indexOf(\"(address at\");\n if (addressAtPos >= 0) {\n newFrame.function = newFrame.function\n .substr(0, addressAtPos)\n .trim();\n }\n }\n\n if (inApp) {\n await this._addSourceContext(newFrame, getDevServer);\n }\n\n return newFrame;\n }\n )\n );\n }\n\n /**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\n private _replaceFramesInEvent(event: Event, frames: StackFrame[]): void {\n if (\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].stacktrace\n ) {\n event.exception.values[0].stacktrace.frames = frames.reverse();\n }\n }\n\n /**\n * This tries to add source context for in_app Frames\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\n private async _addSourceContext(\n frame: StackFrame,\n getDevServer?: GetDevServer\n ): Promise<void> {\n let response;\n\n const segments = frame.filename?.split(\"/\") ?? [];\n\n if (getDevServer) {\n for (const idx in segments) {\n if (Object.prototype.hasOwnProperty.call(segments, idx)) {\n response = await fetch(\n `${getDevServer().url}${segments.slice(-idx).join(\"/\")}`,\n {\n method: \"GET\",\n }\n );\n\n if (response.ok) {\n break;\n }\n }\n }\n }\n\n if (response && response.ok) {\n const content = await response.text();\n const lines = content.split(\"\\n\");\n\n addContextToFrame(lines, frame);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,wBAAwB,GAAG,IAAI,MAAM,CACzC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAClE,CAAC;AA2BF,6DAA6D;AAC7D,MAAM,OAAO,iBAAiB;IAA9B;QAKE;;WAEG;QACI,SAAI,GAAW,iBAAiB,CAAC,EAAE,CAAC;IAkM7C,CAAC;IAhMC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,IAAgB,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;gBACvE,OAAO,KAAK,CAAC;aACd;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAqC,CAAC;YAE9D,8DAA8D;YAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YAExF,IAAI,KAAK,CAAC;YACV,IAAI;gBACF,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;aACrC;YAAC,OAAO,CAAC,EAAE;gBACV,uDAAuD;gBACvD,KAAK,GAAG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AC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACxD;4BACE,MAAM,EAAE,KAAK;yBACd,CACF,CAAC;wBAEF,IAAI,QAAQ,CAAC,EAAE,EAAE;4BACf,MAAM;yBACP;qBACF;iBACF;aACF;YAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,EAAE;gBAC3B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAElC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACjC;;KACF;;AAxMD;;GAEG;AACW,oBAAE,GAAW,mBAAmB,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Integration, StackFrame } from '@sentry/types';\nimport { addContextToFrame, logger } from '@sentry/utils';\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(\n ['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|')\n);\n\ninterface GetDevServer {\n (): { url: string };\n}\n\n/**\n * React Native Stack Frame\n */\ninterface ReactNativeFrame {\n // arguments: []\n column: number;\n file: string;\n lineNumber: number;\n methodName: string;\n}\n\n/**\n * React Native Error\n */\ntype ReactNativeError = Error & {\n framesToPop?: number;\n jsEngine?: string;\n preventSymbolication?: boolean;\n componentStack?: string;\n};\n\n/** Tries to symbolicate the JS stack trace on the device. */\nexport class DebugSymbolicator implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DebugSymbolicator';\n /**\n * @inheritDoc\n */\n public name: string = DebugSymbolicator.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(DebugSymbolicator);\n\n if (!self || hint === undefined || hint.originalException === undefined) {\n return event;\n }\n\n const reactError = hint.originalException as ReactNativeError;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n\n let stack;\n try {\n stack = parseErrorStack(reactError);\n } catch (e) {\n // In RN 0.64 `parseErrorStack` now only takes a string\n stack = parseErrorStack(reactError.stack);\n }\n\n // Ideally this should go into contexts but android sdk doesn't support it\n event.extra = {\n ...event.extra,\n componentStack: reactError.componentStack,\n jsEngine: reactError.jsEngine,\n };\n\n await self._symbolicate(event, stack);\n\n event.platform = 'node'; // Setting platform node makes sure we do not show source maps errors\n\n return event;\n });\n }\n\n /**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\n private async _symbolicate(\n event: Event,\n stack: string | undefined\n ): Promise<void> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n const prettyStack = await symbolicateStackTrace(stack);\n\n if (prettyStack) {\n let newStack = prettyStack;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (prettyStack.stack) {\n // This has been changed in an react-native version so stack is contained in here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n newStack = prettyStack.stack;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const stackWithoutInternalCallsites = newStack.filter(\n (frame: { file?: string }) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null\n );\n\n const symbolicatedFrames = await this._convertReactNativeFramesToSentryFrames(\n stackWithoutInternalCallsites\n );\n this._replaceFramesInEvent(event, symbolicatedFrames);\n } else {\n logger.error('The stack is null');\n }\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n }\n }\n\n /**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\n private async _convertReactNativeFramesToSentryFrames(\n frames: ReactNativeFrame[]\n ): Promise<StackFrame[]> {\n let getDevServer: GetDevServer;\n try {\n getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n } catch (_oO) {\n // We can't load devserver URL\n }\n // Below you will find lines marked with :HACK to prevent showing errors in the sentry ui\n // But since this is a debug only feature: This is Fine (TM)\n return Promise.all(\n frames.map(\n async (frame: ReactNativeFrame): Promise<StackFrame> => {\n let inApp = !!frame.column && !!frame.lineNumber;\n inApp =\n inApp &&\n frame.file !== undefined &&\n !frame.file.includes('node_modules') &&\n !frame.file.includes('native code');\n\n const newFrame: StackFrame = {\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n lineno: inApp ? frame.lineNumber : undefined, // :HACK\n platform: inApp ? 'javascript' : 'node', // :HACK\n };\n\n // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and\n // leaves a trailing `(address at` in the function name.\n // `react-native@0.62` seems to have custom logic to parse hermes frames specially.\n // Anyway, all we do here is throw away the bogus suffix.\n if (newFrame.function) {\n const addressAtPos = newFrame.function.indexOf('(address at');\n if (addressAtPos >= 0) {\n newFrame.function = newFrame.function\n .substr(0, addressAtPos)\n .trim();\n }\n }\n\n if (inApp) {\n await this._addSourceContext(newFrame, getDevServer);\n }\n\n return newFrame;\n }\n )\n );\n }\n\n /**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\n private _replaceFramesInEvent(event: Event, frames: StackFrame[]): void {\n if (\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].stacktrace\n ) {\n event.exception.values[0].stacktrace.frames = frames.reverse();\n }\n }\n\n /**\n * This tries to add source context for in_app Frames\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\n private async _addSourceContext(\n frame: StackFrame,\n getDevServer?: GetDevServer\n ): Promise<void> {\n let response;\n\n const segments = frame.filename?.split('/') ?? [];\n\n if (getDevServer) {\n for (const idx in segments) {\n if (Object.prototype.hasOwnProperty.call(segments, idx)) {\n response = await fetch(\n `${getDevServer().url}${segments.slice(-idx).join('/')}`,\n {\n method: 'GET',\n }\n );\n\n if (response.ok) {\n break;\n }\n }\n }\n }\n\n if (response && response.ok) {\n const content = await response.text();\n const lines = content.split('\\n');\n\n addContextToFrame(lines, frame);\n }\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { addGlobalEventProcessor, getCurrentHub } from
|
|
3
|
-
import { logger } from
|
|
4
|
-
import { NATIVE } from
|
|
2
|
+
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
|
|
3
|
+
import { logger } from '@sentry/utils';
|
|
4
|
+
import { NATIVE } from '../wrapper';
|
|
5
5
|
/** Load device context from native. */
|
|
6
6
|
export class DeviceContext {
|
|
7
7
|
constructor() {
|
|
@@ -39,5 +39,5 @@ export class DeviceContext {
|
|
|
39
39
|
/**
|
|
40
40
|
* @inheritDoc
|
|
41
41
|
*/
|
|
42
|
-
DeviceContext.id =
|
|
42
|
+
DeviceContext.id = 'DeviceContext';
|
|
43
43
|
//# sourceMappingURL=devicecontext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,uCAAuC;AACvC,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IA8BzC,CAAC;IA5BC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;;YAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAC3D,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;YAED,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,yBAAyB,EAAE,CAAC;gBAE1D,MAAM,OAAO,SAAG,QAAQ,CAAC,SAAS,CAAa,mCAAI,EAAE,CAAC;gBACtD,MAAM,IAAI,SAAG,QAAQ,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;gBAEpC,KAAK,CAAC,QAAQ,mCAAQ,OAAO,GAAK,KAAK,CAAC,QAAQ,CAAE,CAAC;gBAEnD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;oBACf,KAAK,CAAC,IAAI,qBAAQ,IAAI,CAAE,CAAC;iBAC1B;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC,EAAE,CAAC,CAAC;aAC9D;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AArCD;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from
|
|
1
|
+
{"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,uCAAuC;AACvC,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IA8BzC,CAAC;IA5BC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;;YAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAC3D,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;YAED,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,yBAAyB,EAAE,CAAC;gBAE1D,MAAM,OAAO,SAAG,QAAQ,CAAC,SAAS,CAAa,mCAAI,EAAE,CAAC;gBACtD,MAAM,IAAI,SAAG,QAAQ,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;gBAEpC,KAAK,CAAC,QAAQ,mCAAQ,OAAO,GAAK,KAAK,CAAC,QAAQ,CAAE,CAAC;gBAEnD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;oBACf,KAAK,CAAC,IAAI,qBAAQ,IAAI,CAAE,CAAC;iBAC1B;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC,EAAE,CAAC,CAAC;aAC9D;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AArCD;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Contexts, Event, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NATIVE } from '../wrapper';\n\n/** Load device context from native. */\nexport class DeviceContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DeviceContext';\n\n /**\n * @inheritDoc\n */\n public name: string = DeviceContext.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(DeviceContext);\n if (!self) {\n return event;\n }\n\n try {\n const contexts = await NATIVE.fetchNativeDeviceContexts();\n\n const context = contexts['context'] as Contexts ?? {};\n const user = contexts['user'] ?? {};\n\n event.contexts = { ...context, ...event.contexts };\n\n if (!event.user) {\n event.user = { ...user };\n }\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n return event;\n });\n }\n}\n"]}
|
|
@@ -13,8 +13,8 @@ export class EventOrigin {
|
|
|
13
13
|
addGlobalEventProcessor((event) => {
|
|
14
14
|
var _a;
|
|
15
15
|
event.tags = (_a = event.tags) !== null && _a !== void 0 ? _a : {};
|
|
16
|
-
event.tags[
|
|
17
|
-
event.tags[
|
|
16
|
+
event.tags['event.origin'] = 'javascript';
|
|
17
|
+
event.tags['event.environment'] = 'javascript';
|
|
18
18
|
return event;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -22,5 +22,5 @@ export class EventOrigin {
|
|
|
22
22
|
/**
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
25
|
-
EventOrigin.id =
|
|
25
|
+
EventOrigin.id = 'EventOrigin';
|
|
26
26
|
//# sourceMappingURL=eventorigin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,OAAO,WAAW;IAAxB;QAME;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;IAevC,CAAC;IAbC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,uBAAuB,CAAC,CAAC,KAAK,EAAE,EAAE;;YAChC,KAAK,CAAC,IAAI,SAAG,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBD;;GAEG;AACW,cAAE,GAAW,aAAa,CAAC","sourcesContent":["import { EventProcessor, Integration } from
|
|
1
|
+
{"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,OAAO,WAAW;IAAxB;QAME;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;IAevC,CAAC;IAbC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,uBAAuB,CAAC,CAAC,KAAK,EAAE,EAAE;;YAChC,KAAK,CAAC,IAAI,SAAG,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBD;;GAEG;AACW,cAAE,GAAW,aAAa,CAAC","sourcesContent":["import { EventProcessor, Integration } from '@sentry/types';\n\n/** Default EventOrigin instrumentation */\nexport class EventOrigin implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'EventOrigin';\n\n /**\n * @inheritDoc\n */\n public name: string = EventOrigin.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n addGlobalEventProcessor((event) => {\n event.tags = event.tags ?? {};\n\n event.tags['event.origin'] = 'javascript';\n event.tags['event.environment'] = 'javascript';\n\n return event;\n });\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DebugSymbolicator } from
|
|
2
|
-
export { DeviceContext } from
|
|
3
|
-
export { ReactNativeErrorHandlers } from
|
|
4
|
-
export { Release } from
|
|
5
|
-
export { EventOrigin } from
|
|
6
|
-
export { SdkInfo } from
|
|
1
|
+
export { DebugSymbolicator } from './debugsymbolicator';
|
|
2
|
+
export { DeviceContext } from './devicecontext';
|
|
3
|
+
export { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';
|
|
4
|
+
export { Release } from './release';
|
|
5
|
+
export { EventOrigin } from './eventorigin';
|
|
6
|
+
export { SdkInfo } from './sdkinfo';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DebugSymbolicator } from
|
|
2
|
-
export { DeviceContext } from
|
|
3
|
-
export { ReactNativeErrorHandlers } from
|
|
4
|
-
export { Release } from
|
|
5
|
-
export { EventOrigin } from
|
|
6
|
-
export { SdkInfo } from
|
|
1
|
+
export { DebugSymbolicator } from './debugsymbolicator';
|
|
2
|
+
export { DeviceContext } from './devicecontext';
|
|
3
|
+
export { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';
|
|
4
|
+
export { Release } from './release';
|
|
5
|
+
export { EventOrigin } from './eventorigin';
|
|
6
|
+
export { SdkInfo } from './sdkinfo';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/js/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { DebugSymbolicator } from
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/js/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { DebugSymbolicator } from './debugsymbolicator';\nexport { DeviceContext } from './devicecontext';\nexport { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';\nexport { Release } from './release';\nexport { EventOrigin } from './eventorigin';\nexport { SdkInfo } from './sdkinfo';\n"]}
|