@sentry/react-native 5.20.0 → 5.22.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 +43 -0
- package/RNSentry.podspec +2 -2
- package/android/build.gradle +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +7 -0
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/screenshot.d.ts.map +1 -1
- package/dist/js/integrations/screenshot.js +5 -1
- package/dist/js/integrations/screenshot.js.map +1 -1
- package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
- package/dist/js/integrations/viewhierarchy.js.map +1 -1
- package/dist/js/options.d.ts +7 -1
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +4 -1
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/tools/metroconfig.d.ts +3 -1
- package/dist/js/tools/metroconfig.d.ts.map +1 -1
- package/dist/js/tools/metroconfig.js +12 -1
- package/dist/js/tools/metroconfig.js.map +1 -1
- package/dist/js/tracing/addTracingExtensions.d.ts.map +1 -1
- package/dist/js/tracing/addTracingExtensions.js +9 -1
- package/dist/js/tracing/addTracingExtensions.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +5 -1
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +77 -61
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/stalltracking.d.ts.map +1 -1
- package/dist/js/tracing/stalltracking.js +10 -0
- package/dist/js/tracing/stalltracking.js.map +1 -1
- package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplay.js +4 -1
- package/dist/js/tracing/timetodisplay.js.map +1 -1
- package/dist/js/tracing/transaction.d.ts.map +1 -1
- package/dist/js/tracing/transaction.js +10 -4
- package/dist/js/tracing/transaction.js.map +1 -1
- package/dist/js/utils/environment.d.ts +2 -0
- package/dist/js/utils/environment.d.ts.map +1 -1
- package/dist/js/utils/environment.js +9 -0
- package/dist/js/utils/environment.js.map +1 -1
- package/dist/js/utils/worldwide.d.ts +5 -0
- package/dist/js/utils/worldwide.d.ts.map +1 -1
- package/dist/js/utils/worldwide.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/ios/RNSentry.h +0 -12
- package/ios/RNSentry.mm +4 -3
- package/ios/RNSentryId.h +9 -0
- package/ios/RNSentryId.m +10 -0
- package/package.json +12 -12
- package/ts3.8/dist/js/options.d.ts +7 -1
- package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +5 -1
- package/ts3.8/dist/js/utils/environment.d.ts +2 -0
- package/ts3.8/dist/js/utils/worldwide.d.ts +5 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/js/tracing/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAyB,CAAC,WAA4B,EAAQ,EAAE;IACjG,MAAM,UAAU,GACd,WAAW,CAAC,YAAY;QACxB,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC;IAE3F,IAAI,CAAC,UAAU,IAAI,UAAU,IAAI,CAAC,EAAE;QAClC,MAAM,CAAC,GAAG,CAAC,mBAAmB,WAAW,CAAC,EAAE,kCAAkC,CAAC,CAAC;QAChF,WAAW,CA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C,SAAS,CAAC,WAAW,CAAC,CAAC;YACnC,WAAW,CAAC,MAAM,EAAE,CAAC;SACtB;IACH,CAAC,CACF,CAAC;IACF,YAAY;QACV,WAAW,CAAC,4BAA4B,CAAC,GAAG,EAAE;YAC5C,MAAM,CAAC,KAAK,CAAC,kCAAkC,WAAW,CAAC,EAAE,eAAe,CAAC,CAAC;YAC9E,YAAY,IAAI,YAAY,CAAC,MAAM,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import { type BeforeFinishCallback, type IdleTransaction } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport type { AppStateStatus, NativeEventSubscription } from 'react-native';\nimport { AppState } from 'react-native';\n\n/**\n * Idle Transaction callback to only sample transactions with child spans.\n * To avoid side effects of other callbacks this should be hooked as the last callback.\n */\nexport const onlySampleIfChildSpans: BeforeFinishCallback = (transaction: IdleTransaction): void => {\n const spansCount =\n transaction.spanRecorder &&\n transaction.spanRecorder.spans.filter(span => span.spanId !== transaction.spanId).length;\n\n if (!spansCount || spansCount <= 0) {\n logger.log(`Not sampling as ${transaction.op} transaction has no child spans.`);\n transaction.sampled = false;\n }\n};\n\n/**\n * Hooks on AppState change to cancel the transaction if the app goes background.\n */\nexport const cancelInBackground = (transaction: IdleTransaction): void => {\n if (!AppState || !AppState.isAvailable) {\n logger.warn('AppState is not available, spans will not be canceled in background.');\n return;\n }\n\n // RN Web can return undefined, https://github.com/necolas/react-native-web/blob/8cf720f0e57c74a254bfa7bed0313e33a4b29c11/packages/react-native-web/src/exports/AppState/index.js#L55\n const subscription: NativeEventSubscription | undefined = AppState.addEventListener(\n 'change',\n (newState: AppStateStatus) => {\n if (newState === 'background') {\n logger.debug(`Setting ${transaction.op} transaction to cancelled because the app is in the background.`);\n transaction.setStatus('cancelled');\n transaction.finish();\n }\n },\n );\n subscription &&\n transaction.registerBeforeFinishCallback(() => {\n logger.debug(`Removing AppState listener for ${transaction.op} transaction.`);\n subscription && subscription.remove && subscription.remove();\n });\n};\n"]}
|
|
@@ -20,4 +20,6 @@ export declare function notWeb(): boolean;
|
|
|
20
20
|
export declare function getHermesVersion(): string | undefined;
|
|
21
21
|
/** Returns default environment based on __DEV__ */
|
|
22
22
|
export declare function getDefaultEnvironment(): 'development' | 'production';
|
|
23
|
+
/** Check if SDK runs in Metro Dev Server side */
|
|
24
|
+
export declare function isRunningInMetroDevServer(): boolean;
|
|
23
25
|
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAMA,0DAA0D;AAC1D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAM1D;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,kCAAkC;AAClC,wBAAgB,QAAQ,IAAI,OAAO,CAGlC;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAGrD;AAED,4CAA4C;AAC5C,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAKtD;AAED,gDAAgD;AAChD,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAMrD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,aAAa,GAAG,YAAY,CAEpE"}
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAMA,0DAA0D;AAC1D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAM1D;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,kCAAkC;AAClC,wBAAgB,QAAQ,IAAI,OAAO,CAGlC;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAGrD;AAED,4CAA4C;AAC5C,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAKtD;AAED,gDAAgD;AAChD,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAMrD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,aAAa,GAAG,YAAY,CAEpE;AAED,iDAAiD;AACjD,wBAAgB,yBAAyB,IAAI,OAAO,CASnD"}
|
|
@@ -57,4 +57,13 @@ export function getHermesVersion() {
|
|
|
57
57
|
export function getDefaultEnvironment() {
|
|
58
58
|
return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';
|
|
59
59
|
}
|
|
60
|
+
/** Check if SDK runs in Metro Dev Server side */
|
|
61
|
+
export function isRunningInMetroDevServer() {
|
|
62
|
+
if (typeof RN_GLOBAL_OBJ.process !== 'undefined' &&
|
|
63
|
+
RN_GLOBAL_OBJ.process.env &&
|
|
64
|
+
RN_GLOBAL_OBJ.process.env.___SENTRY_METRO_DEV_SERVER___ === 'true') {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
60
69
|
//# sourceMappingURL=environment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings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a,GAAG,gBAAgB,EAAE,CAAC;IACzC,OAAO,OAAO,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,CAAA,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,iBAAiB;;IAC/B,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,EAAE,cAAc,CAAC,GACtB,OAAO,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,0CAAE,cAAc,CAAA,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtH,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,MAAM;IACpB,OAAO,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AAC/B,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CACL,aAAa,CAAC,cAAc;QAC5B,aAAa,CAAC,cAAc,CAAC,oBAAoB;QACjD,aAAa,CAAC,cAAc,CAAC,oBAAoB,EAAE,CAAC,qBAAqB,CAAC,CAC3E,CAAC;AACJ,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC;AAClF,CAAC","sourcesContent":["import { Platform } from 'react-native';\n\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { getExpoConstants } from './expomodules';\nimport { ReactNativeLibraries } from './rnlibraries';\n\n/** Checks if the React Native Hermes engine is running */\nexport function isHermesEnabled(): boolean {\n return !!RN_GLOBAL_OBJ.HermesInternal;\n}\n\n/** Checks if the React Native TurboModules are enabled */\nexport function isTurboModuleEnabled(): boolean {\n return RN_GLOBAL_OBJ.__turboModuleProxy != null;\n}\n\n/** Checks if the React Native Fabric renderer is running */\nexport function isFabricEnabled(): boolean {\n return RN_GLOBAL_OBJ.nativeFabricUIManager != null;\n}\n\n/** Returns React Native Version as semver string */\nexport function getReactNativeVersion(): string | undefined {\n if (!ReactNativeLibraries.ReactNativeVersion) {\n return undefined;\n }\n const RNV = ReactNativeLibraries.ReactNativeVersion.version;\n return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;\n}\n\n/** Checks if Expo is present in the runtime */\nexport function isExpo(): boolean {\n return RN_GLOBAL_OBJ.expo != null;\n}\n\n/** Check if JS runs in Expo Go */\nexport function isExpoGo(): boolean {\n const expoConstants = getExpoConstants();\n return (expoConstants && expoConstants.appOwnership) === 'expo';\n}\n\n/** Check Expo Go version if available */\nexport function getExpoGoVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n return typeof expoConstants?.expoVersion === 'string' ? expoConstants.expoVersion : undefined;\n}\n\n/** Returns Expo SDK version if available */\nexport function getExpoSdkVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n const [, expoSdkVersion] =\n typeof expoConstants?.manifest?.runtimeVersion === 'string' ? expoConstants.manifest.runtimeVersion.split(':') : [];\n return expoSdkVersion;\n}\n\n/** Checks if the current platform is not web */\nexport function notWeb(): boolean {\n return Platform.OS !== 'web';\n}\n\n/** Returns Hermes Version if hermes is present in the runtime */\nexport function getHermesVersion(): string | undefined {\n return (\n RN_GLOBAL_OBJ.HermesInternal &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties()['OSS Release Version']\n );\n}\n\n/** Returns default environment based on __DEV__ */\nexport function getDefaultEnvironment(): 'development' | 'production' {\n return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';\n}\n"]}
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AAa,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK,MAAM,EAClE;QACA,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { Platform } from 'react-native';\n\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { getExpoConstants } from './expomodules';\nimport { ReactNativeLibraries } from './rnlibraries';\n\n/** Checks if the React Native Hermes engine is running */\nexport function isHermesEnabled(): boolean {\n return !!RN_GLOBAL_OBJ.HermesInternal;\n}\n\n/** Checks if the React Native TurboModules are enabled */\nexport function isTurboModuleEnabled(): boolean {\n return RN_GLOBAL_OBJ.__turboModuleProxy != null;\n}\n\n/** Checks if the React Native Fabric renderer is running */\nexport function isFabricEnabled(): boolean {\n return RN_GLOBAL_OBJ.nativeFabricUIManager != null;\n}\n\n/** Returns React Native Version as semver string */\nexport function getReactNativeVersion(): string | undefined {\n if (!ReactNativeLibraries.ReactNativeVersion) {\n return undefined;\n }\n const RNV = ReactNativeLibraries.ReactNativeVersion.version;\n return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;\n}\n\n/** Checks if Expo is present in the runtime */\nexport function isExpo(): boolean {\n return RN_GLOBAL_OBJ.expo != null;\n}\n\n/** Check if JS runs in Expo Go */\nexport function isExpoGo(): boolean {\n const expoConstants = getExpoConstants();\n return (expoConstants && expoConstants.appOwnership) === 'expo';\n}\n\n/** Check Expo Go version if available */\nexport function getExpoGoVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n return typeof expoConstants?.expoVersion === 'string' ? expoConstants.expoVersion : undefined;\n}\n\n/** Returns Expo SDK version if available */\nexport function getExpoSdkVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n const [, expoSdkVersion] =\n typeof expoConstants?.manifest?.runtimeVersion === 'string' ? expoConstants.manifest.runtimeVersion.split(':') : [];\n return expoSdkVersion;\n}\n\n/** Checks if the current platform is not web */\nexport function notWeb(): boolean {\n return Platform.OS !== 'web';\n}\n\n/** Returns Hermes Version if hermes is present in the runtime */\nexport function getHermesVersion(): string | undefined {\n return (\n RN_GLOBAL_OBJ.HermesInternal &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties &&\n RN_GLOBAL_OBJ.HermesInternal.getRuntimeProperties()['OSS Release Version']\n );\n}\n\n/** Returns default environment based on __DEV__ */\nexport function getDefaultEnvironment(): 'development' | 'production' {\n return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';\n}\n\n/** Check if SDK runs in Metro Dev Server side */\nexport function isRunningInMetroDevServer(): boolean {\n if (\n typeof RN_GLOBAL_OBJ.process !== 'undefined' &&\n RN_GLOBAL_OBJ.process.env &&\n RN_GLOBAL_OBJ.process.env.___SENTRY_METRO_DEV_SERVER___ === 'true'\n ) {\n return true;\n }\n return false;\n}\n"]}
|
|
@@ -15,6 +15,11 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
15
15
|
ErrorUtils?: ErrorUtils;
|
|
16
16
|
expo?: ExpoGlobalObject;
|
|
17
17
|
XMLHttpRequest?: typeof XMLHttpRequest;
|
|
18
|
+
process?: {
|
|
19
|
+
env?: {
|
|
20
|
+
___SENTRY_METRO_DEV_SERVER___?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
/** Get's the global object for the current JavaScript runtime */
|
|
20
25
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worldwide.d.ts","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,kFAAkF;AAClF,MAAM,WAAW,y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E,MAAM,CAAC;SACxC,CAAC;KACH,CAAC;CACH;AAED,iEAAiE;AACjE,eAAO,MAAM,aAAa,2BAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAyB3C,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAuC,CAAC","sourcesContent":["import type { InternalGlobal } from '@sentry/utils';\nimport { GLOBAL_OBJ } from '@sentry/utils';\nimport type { ErrorUtils } from 'react-native/types';\n\nimport type { ExpoGlobalObject } from './expoglobalobject';\n\n/** Internal Global object interface with common and Sentry specific properties */\nexport interface ReactNativeInternalGlobal extends InternalGlobal {\n __sentry_rn_v4_registered?: boolean;\n __sentry_rn_v5_registered?: boolean;\n HermesInternal?: {\n getRuntimeProperties?: () => Record<string, string | undefined>;\n };\n Promise: unknown;\n __turboModuleProxy: unknown;\n nativeFabricUIManager: unknown;\n ErrorUtils?: ErrorUtils;\n expo?: ExpoGlobalObject;\n XMLHttpRequest?: typeof XMLHttpRequest;\n process?: {\n env?: {\n ___SENTRY_METRO_DEV_SERVER___?: string;\n };\n };\n}\n\n/** Get's the global object for the current JavaScript runtime */\nexport const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal;\n"]}
|
package/dist/js/version.d.ts
CHANGED
package/dist/js/version.js
CHANGED
package/dist/js/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.22.0';\n"]}
|
package/ios/RNSentry.h
CHANGED
|
@@ -33,15 +33,3 @@ SentrySDK (Private)
|
|
|
33
33
|
symbolicate: (SymbolicateCallbackType) symbolicate;
|
|
34
34
|
|
|
35
35
|
@end
|
|
36
|
-
|
|
37
|
-
@interface SentryCurrentDateProvider : NSObject
|
|
38
|
-
|
|
39
|
-
- (NSDate *)date;
|
|
40
|
-
|
|
41
|
-
- (dispatch_time_t)dispatchTimeNow;
|
|
42
|
-
|
|
43
|
-
- (NSInteger)timezoneOffset;
|
|
44
|
-
|
|
45
|
-
- (uint64_t)systemTime;
|
|
46
|
-
|
|
47
|
-
@end
|
package/ios/RNSentry.mm
CHANGED
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
#define SENTRY_TARGET_PROFILING_SUPPORTED 0
|
|
16
16
|
#endif
|
|
17
17
|
|
|
18
|
-
#import <Sentry/Sentry.h>
|
|
19
18
|
#import <Sentry/PrivateSentrySDKOnly.h>
|
|
20
19
|
#import <Sentry/SentryScreenFrames.h>
|
|
21
20
|
#import <Sentry/SentryOptions+HybridSDKs.h>
|
|
22
21
|
#import <Sentry/SentryBinaryImageCache.h>
|
|
23
22
|
#import <Sentry/SentryDependencyContainer.h>
|
|
24
23
|
#import <Sentry/SentryFormatter.h>
|
|
24
|
+
#import <Sentry/SentryAppStartMeasurement.h>
|
|
25
|
+
#import "RNSentryId.h"
|
|
25
26
|
|
|
26
27
|
// This guard prevents importing Hermes in JSC apps
|
|
27
28
|
#if SENTRY_PROFILING_ENABLED
|
|
@@ -643,7 +644,7 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSDictionary *, startProfiling)
|
|
|
643
644
|
facebook::hermes::HermesRuntime::enableSamplingProfiler();
|
|
644
645
|
if (nativeProfileTraceId == nil && nativeProfileStartTime == 0) {
|
|
645
646
|
#if SENTRY_TARGET_PROFILING_SUPPORTED
|
|
646
|
-
nativeProfileTraceId = [
|
|
647
|
+
nativeProfileTraceId = [RNSentryId newId];
|
|
647
648
|
nativeProfileStartTime = [PrivateSentrySDKOnly startProfilerForTrace: nativeProfileTraceId];
|
|
648
649
|
#endif
|
|
649
650
|
} else {
|
|
@@ -681,7 +682,7 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSDictionary *, stopProfiling)
|
|
|
681
682
|
NSDictionary<NSString *, id> * nativeProfile = nil;
|
|
682
683
|
if (nativeProfileTraceId != nil && nativeProfileStartTime != 0) {
|
|
683
684
|
#if SENTRY_TARGET_PROFILING_SUPPORTED
|
|
684
|
-
uint64_t nativeProfileStopTime =
|
|
685
|
+
uint64_t nativeProfileStopTime = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
|
|
685
686
|
nativeProfile = [PrivateSentrySDKOnly collectProfileBetween:nativeProfileStartTime and:nativeProfileStopTime forTrace:nativeProfileTraceId];
|
|
686
687
|
#endif
|
|
687
688
|
}
|
package/ios/RNSentryId.h
ADDED
package/ios/RNSentryId.m
ADDED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sentry/react-native",
|
|
3
3
|
"homepage": "https://github.com/getsentry/sentry-react-native",
|
|
4
4
|
"repository": "https://github.com/getsentry/sentry-react-native",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.22.0",
|
|
6
6
|
"description": "Official Sentry SDK for react-native",
|
|
7
7
|
"typings": "dist/js/index.d.ts",
|
|
8
8
|
"types": "dist/js/index.d.ts",
|
|
@@ -66,22 +66,22 @@
|
|
|
66
66
|
"react-native": ">=0.65.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@sentry/browser": "7.
|
|
70
|
-
"@sentry/cli": "2.30.
|
|
71
|
-
"@sentry/core": "7.
|
|
72
|
-
"@sentry/hub": "7.
|
|
73
|
-
"@sentry/integrations": "7.
|
|
74
|
-
"@sentry/react": "7.
|
|
75
|
-
"@sentry/types": "7.
|
|
76
|
-
"@sentry/utils": "7.
|
|
69
|
+
"@sentry/browser": "7.110.1",
|
|
70
|
+
"@sentry/cli": "2.30.4",
|
|
71
|
+
"@sentry/core": "7.110.1",
|
|
72
|
+
"@sentry/hub": "7.110.1",
|
|
73
|
+
"@sentry/integrations": "7.110.1",
|
|
74
|
+
"@sentry/react": "7.110.1",
|
|
75
|
+
"@sentry/types": "7.110.1",
|
|
76
|
+
"@sentry/utils": "7.110.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@babel/core": "^7.23.5",
|
|
80
80
|
"@expo/metro-config": "0.17.5",
|
|
81
81
|
"@mswjs/interceptors": "^0.25.15",
|
|
82
|
-
"@sentry-internal/eslint-config-sdk": "7.
|
|
83
|
-
"@sentry-internal/eslint-plugin-sdk": "7.
|
|
84
|
-
"@sentry-internal/typescript": "7.
|
|
82
|
+
"@sentry-internal/eslint-config-sdk": "7.110.1",
|
|
83
|
+
"@sentry-internal/eslint-plugin-sdk": "7.110.1",
|
|
84
|
+
"@sentry-internal/typescript": "7.110.1",
|
|
85
85
|
"@sentry/wizard": "3.16.3",
|
|
86
86
|
"@types/jest": "^29.5.3",
|
|
87
87
|
"@types/node": "^20.9.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
|
|
2
2
|
import type { ProfilerProps } from '@sentry/react/types/profiler';
|
|
3
|
-
import type { CaptureContext, ClientOptions, Options } from '@sentry/types';
|
|
3
|
+
import type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/types';
|
|
4
4
|
import type { TouchEventBoundaryProps } from './touchevents';
|
|
5
5
|
export interface BaseReactNativeOptions {
|
|
6
6
|
/**
|
|
@@ -153,6 +153,12 @@ export interface BaseReactNativeOptions {
|
|
|
153
153
|
* @default "http://localhost:8969/stream"
|
|
154
154
|
*/
|
|
155
155
|
spotlightSidecarUrl?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Sets a callback which is executed before capturing screenshots. Only
|
|
158
|
+
* relevant if `attachScreenshot` is set to true. When false is returned
|
|
159
|
+
* from the function, no screenshot will be attached.
|
|
160
|
+
*/
|
|
161
|
+
beforeScreenshot?: (event: Event, hint: EventHint) => boolean;
|
|
156
162
|
}
|
|
157
163
|
export interface ReactNativeTransportOptions extends BrowserTransportOptions {
|
|
158
164
|
/**
|
|
@@ -103,7 +103,7 @@ export declare class ReactNativeTracing implements Integration {
|
|
|
103
103
|
/**
|
|
104
104
|
* Registers routing and request instrumentation.
|
|
105
105
|
*/
|
|
106
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void
|
|
106
|
+
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): Promise<void>;
|
|
107
107
|
/**
|
|
108
108
|
* To be called on a transaction start. Can have async methods
|
|
109
109
|
*/
|
|
@@ -124,6 +124,10 @@ export declare class ReactNativeTracing implements Integration {
|
|
|
124
124
|
elementId: string | undefined;
|
|
125
125
|
op: string;
|
|
126
126
|
}): TransactionType | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Enables or disables native frames tracking based on the `enableNativeFramesTracking` option.
|
|
129
|
+
*/
|
|
130
|
+
private _enableNativeFramesTracking;
|
|
127
131
|
/**
|
|
128
132
|
* Sets the current view name into the app context.
|
|
129
133
|
* @param event Le event.
|
|
@@ -20,4 +20,6 @@ export declare function notWeb(): boolean;
|
|
|
20
20
|
export declare function getHermesVersion(): string | undefined;
|
|
21
21
|
/** Returns default environment based on __DEV__ */
|
|
22
22
|
export declare function getDefaultEnvironment(): 'development' | 'production';
|
|
23
|
+
/** Check if SDK runs in Metro Dev Server side */
|
|
24
|
+
export declare function isRunningInMetroDevServer(): boolean;
|
|
23
25
|
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -15,6 +15,11 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
15
15
|
ErrorUtils?: ErrorUtils;
|
|
16
16
|
expo?: ExpoGlobalObject;
|
|
17
17
|
XMLHttpRequest?: typeof XMLHttpRequest;
|
|
18
|
+
process?: {
|
|
19
|
+
env?: {
|
|
20
|
+
___SENTRY_METRO_DEV_SERVER___?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
/** Get's the global object for the current JavaScript runtime */
|
|
20
25
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|