@sentry/react-native 5.23.1 → 5.24.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 +42 -1
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +7 -23
- package/dist/js/NativeRNSentry.d.ts +8 -3
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/client.d.ts +1 -1
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +2 -2
- package/dist/js/client.js.map +1 -1
- package/dist/js/tracing/nativeframes.d.ts +2 -2
- package/dist/js/tracing/nativeframes.d.ts.map +1 -1
- package/dist/js/tracing/nativeframes.js +36 -14
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.d.ts +1 -0
- package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.js +7 -3
- package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +18 -0
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +93 -10
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/utils.d.ts +6 -0
- package/dist/js/tracing/utils.d.ts.map +1 -1
- package/dist/js/tracing/utils.js +21 -1
- package/dist/js/tracing/utils.js.map +1 -1
- package/dist/js/utils/worldwide.d.ts +2 -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.mm +10 -20
- package/package.json +11 -11
- package/scripts/sentry-xcode-debug-files.sh +10 -1
- package/scripts/sentry-xcode.sh +10 -1
- package/src/js/NativeRNSentry.ts +8 -3
- package/ts3.8/dist/js/NativeRNSentry.d.ts +8 -3
- package/ts3.8/dist/js/client.d.ts +1 -1
- package/ts3.8/dist/js/tracing/nativeframes.d.ts +2 -2
- package/ts3.8/dist/js/tracing/reactnativeprofiler.d.ts +1 -0
- package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +18 -0
- package/ts3.8/dist/js/tracing/utils.d.ts +6 -0
- package/ts3.8/dist/js/utils/worldwide.d.ts +2 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
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.24.1",
|
|
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",
|
|
@@ -67,22 +67,22 @@
|
|
|
67
67
|
"react-native": ">=0.65.0"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@sentry/browser": "7.
|
|
70
|
+
"@sentry/browser": "7.117.0",
|
|
71
71
|
"@sentry/cli": "2.31.2",
|
|
72
|
-
"@sentry/core": "7.
|
|
73
|
-
"@sentry/hub": "7.
|
|
74
|
-
"@sentry/integrations": "7.
|
|
75
|
-
"@sentry/react": "7.
|
|
76
|
-
"@sentry/types": "7.
|
|
77
|
-
"@sentry/utils": "7.
|
|
72
|
+
"@sentry/core": "7.117.0",
|
|
73
|
+
"@sentry/hub": "7.117.0",
|
|
74
|
+
"@sentry/integrations": "7.117.0",
|
|
75
|
+
"@sentry/react": "7.117.0",
|
|
76
|
+
"@sentry/types": "7.117.0",
|
|
77
|
+
"@sentry/utils": "7.117.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/core": "^7.23.5",
|
|
81
81
|
"@expo/metro-config": "0.17.5",
|
|
82
82
|
"@mswjs/interceptors": "^0.25.15",
|
|
83
|
-
"@sentry-internal/eslint-config-sdk": "7.
|
|
84
|
-
"@sentry-internal/eslint-plugin-sdk": "7.
|
|
85
|
-
"@sentry-internal/typescript": "7.
|
|
83
|
+
"@sentry-internal/eslint-config-sdk": "7.117.0",
|
|
84
|
+
"@sentry-internal/eslint-plugin-sdk": "7.117.0",
|
|
85
|
+
"@sentry-internal/typescript": "7.117.0",
|
|
86
86
|
"@sentry/wizard": "3.16.3",
|
|
87
87
|
"@types/jest": "^29.5.3",
|
|
88
88
|
"@types/node": "^20.9.3",
|
|
@@ -35,5 +35,14 @@ if [ "$SENTRY_DISABLE_AUTO_UPLOAD" == true ]; then
|
|
|
35
35
|
elif echo "$XCODE_BUILD_CONFIGURATION" | grep -iq "debug"; then # case insensitive check for "debug"
|
|
36
36
|
echo "Skipping debug files upload for *Debug* configuration"
|
|
37
37
|
else
|
|
38
|
-
|
|
38
|
+
# 'warning:' triggers a warning in Xcode, 'error:' triggers an error
|
|
39
|
+
set +x +e # disable printing commands otherwise we might print `error:` by accident and allow continuing on error
|
|
40
|
+
SENTRY_UPLOAD_COMMAND_OUTPUT=$(/bin/sh -c "\"$LOCAL_NODE_BINARY\" $UPLOAD_DEBUG_FILES" 2>&1)
|
|
41
|
+
if [ $? -eq 0 ]; then
|
|
42
|
+
echo "$SENTRY_UPLOAD_COMMAND_OUTPUT" | awk '{print "output: sentry-cli - " $0}'
|
|
43
|
+
else
|
|
44
|
+
echo "error: sentry-cli - To disable native debug files auto upload, set SENTRY_DISABLE_AUTO_UPLOAD=true in your environment variables. Or to allow failing upload, set SENTRY_ALLOW_FAILURE=true"
|
|
45
|
+
echo "error: sentry-cli - $SENTRY_UPLOAD_COMMAND_OUTPUT"
|
|
46
|
+
fi
|
|
47
|
+
set -x -e # re-enable
|
|
39
48
|
fi
|
package/scripts/sentry-xcode.sh
CHANGED
|
@@ -23,7 +23,16 @@ ARGS="$NO_AUTO_RELEASE $SENTRY_CLI_EXTRA_ARGS $SENTRY_CLI_RN_XCODE_EXTRA_ARGS"
|
|
|
23
23
|
REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-native xcode $ARGS \"$REACT_NATIVE_XCODE\""
|
|
24
24
|
|
|
25
25
|
if [ "$SENTRY_DISABLE_AUTO_UPLOAD" != true ]; then
|
|
26
|
-
|
|
26
|
+
# 'warning:' triggers a warning in Xcode, 'error:' triggers an error
|
|
27
|
+
set +x +e # disable printing commands otherwise we might print `error:` by accident and allow continuing on error
|
|
28
|
+
SENTRY_XCODE_COMMAND_OUTPUT=$(/bin/sh -c "\"$LOCAL_NODE_BINARY\" $REACT_NATIVE_XCODE_WITH_SENTRY" 2>&1)
|
|
29
|
+
if [ $? -eq 0 ]; then
|
|
30
|
+
echo "$SENTRY_XCODE_COMMAND_OUTPUT" | awk '{print "output: sentry-cli - " $0}'
|
|
31
|
+
else
|
|
32
|
+
echo "error: sentry-cli - To disable source maps auto upload, set SENTRY_DISABLE_AUTO_UPLOAD=true in your environment variables. Or to allow failing upload, set SENTRY_ALLOW_FAILURE=true"
|
|
33
|
+
echo "error: sentry-cli - $SENTRY_XCODE_COMMAND_OUTPUT"
|
|
34
|
+
fi
|
|
35
|
+
set -x -e # re-enable
|
|
27
36
|
else
|
|
28
37
|
echo "SENTRY_DISABLE_AUTO_UPLOAD=true, skipping sourcemaps upload"
|
|
29
38
|
/bin/sh -c "$REACT_NATIVE_XCODE"
|
package/src/js/NativeRNSentry.ts
CHANGED
|
@@ -90,9 +90,14 @@ export type NativeStackFrames = {
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
export type NativeAppStartResponse = {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
type: 'cold' | 'warm' | 'unknown';
|
|
94
|
+
has_fetched: boolean;
|
|
95
|
+
app_start_timestamp_ms?: number;
|
|
96
|
+
spans: {
|
|
97
|
+
description: string;
|
|
98
|
+
start_timestamp_ms: number;
|
|
99
|
+
end_timestamp_ms: number;
|
|
100
|
+
}[];
|
|
96
101
|
};
|
|
97
102
|
|
|
98
103
|
export type NativeFramesResponse = {
|
|
@@ -81,9 +81,14 @@ export type NativeStackFrames = {
|
|
|
81
81
|
debugMetaImages?: NativeDebugImage[];
|
|
82
82
|
};
|
|
83
83
|
export type NativeAppStartResponse = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
type: 'cold' | 'warm' | 'unknown';
|
|
85
|
+
has_fetched: boolean;
|
|
86
|
+
app_start_timestamp_ms?: number;
|
|
87
|
+
spans: {
|
|
88
|
+
description: string;
|
|
89
|
+
start_timestamp_ms: number;
|
|
90
|
+
end_timestamp_ms: number;
|
|
91
|
+
}[];
|
|
87
92
|
};
|
|
88
93
|
export type NativeFramesResponse = {
|
|
89
94
|
totalFrames: number;
|
|
@@ -46,11 +46,11 @@ export declare class NativeFramesInstrumentation {
|
|
|
46
46
|
/**
|
|
47
47
|
* Fetch finish frames for a transaction at the current time. Calls any awaiting listeners.
|
|
48
48
|
*/
|
|
49
|
-
private
|
|
49
|
+
private _fetchEndFramesForTransaction;
|
|
50
50
|
/**
|
|
51
51
|
* On a finish frames failure, we cancel the await.
|
|
52
52
|
*/
|
|
53
|
-
private
|
|
53
|
+
private _cancelEndFrames;
|
|
54
54
|
/**
|
|
55
55
|
* Adds frames measurements to an event. Called from a valid event processor.
|
|
56
56
|
* Awaits for finish frames if needed.
|
|
@@ -99,6 +99,7 @@ export declare class ReactNativeTracing implements Integration {
|
|
|
99
99
|
private _hasSetTracePropagationTargets;
|
|
100
100
|
private _hasSetTracingOrigins;
|
|
101
101
|
private _currentViewName;
|
|
102
|
+
private _firstConstructorCallTimestampMs;
|
|
102
103
|
constructor(options?: Partial<ReactNativeTracingOptions>);
|
|
103
104
|
/**
|
|
104
105
|
* Registers routing and request instrumentation.
|
|
@@ -116,6 +117,10 @@ export declare class ReactNativeTracing implements Integration {
|
|
|
116
117
|
* Called by the ReactNativeProfiler component on first component mount.
|
|
117
118
|
*/
|
|
118
119
|
onAppStartFinish(endTimestamp: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Sets the root component first constructor call timestamp.
|
|
122
|
+
*/
|
|
123
|
+
setRootComponentFirstConstructorCallTimestampMs(timestamp: number): void;
|
|
119
124
|
/**
|
|
120
125
|
* Starts a new transaction for a user interaction.
|
|
121
126
|
* @param userInteractionId Consists of `op` representation UI Event and `elementId` unique element identifier on current screen.
|
|
@@ -147,6 +152,19 @@ export declare class ReactNativeTracing implements Integration {
|
|
|
147
152
|
* Adds app start measurements and starts a child span on a transaction.
|
|
148
153
|
*/
|
|
149
154
|
private _addAppStartData;
|
|
155
|
+
/**
|
|
156
|
+
* Adds JS Execution before React Root. If `Sentry.wrap` is not used, create a span for the start of JS Bundle execution.
|
|
157
|
+
*/
|
|
158
|
+
private _addJSExecutionBeforeRoot;
|
|
159
|
+
/**
|
|
160
|
+
* Adds native spans to the app start span.
|
|
161
|
+
*/
|
|
162
|
+
private _addNativeSpansTo;
|
|
163
|
+
/**
|
|
164
|
+
* UIKit init is measured by the native layers till the native SDK start
|
|
165
|
+
* RN initializes the native SDK later, the end timestamp would be wrong
|
|
166
|
+
*/
|
|
167
|
+
private _createUIKitSpan;
|
|
150
168
|
/** To be called when the route changes, but BEFORE the components of the new route mount. */
|
|
151
169
|
private _onRouteWillChange;
|
|
152
170
|
/**
|
|
@@ -29,4 +29,10 @@ export declare function isNearToNow(timestamp: number): boolean;
|
|
|
29
29
|
* Uses `setMeasurement` function from @sentry/core.
|
|
30
30
|
*/
|
|
31
31
|
export declare function setSpanDurationAsMeasurement(name: string, span: Span): void;
|
|
32
|
+
/**
|
|
33
|
+
* Returns unix timestamp in ms of the bundle start time.
|
|
34
|
+
*
|
|
35
|
+
* If not available, returns undefined.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getBundleStartTimestampMs(): number | undefined;
|
|
32
38
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -20,6 +20,8 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
20
20
|
___SENTRY_METRO_DEV_SERVER___?: string;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
+
__BUNDLE_START_TIME__?: number;
|
|
24
|
+
nativePerformanceNow?: () => number;
|
|
23
25
|
}
|
|
24
26
|
/** Get's the global object for the current JavaScript runtime */
|
|
25
27
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|