@sentry/react-native 5.23.0 → 5.24.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 +39 -0
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +7 -18
- 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 +30 -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 +101 -11
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/timetodisplay.d.ts +1 -1
- package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplay.js +15 -7
- package/dist/js/tracing/timetodisplay.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 +12 -40
- package/ios/RNSentryBreadcrumb.h +9 -0
- package/ios/RNSentryBreadcrumb.m +33 -0
- 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/timetodisplay.d.ts +1 -1
- 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
|
@@ -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;
|
|
@@ -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,yBAA0B,SAAQ,cAAc;IAC/D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,CAAC,EAAE;QACf,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;IACvC,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,EAAE;YACJ,6BAA6B,CAAC,EAAE,MAAM,CAAC;SACxC,CAAC;KACH,CAAC;
|
|
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,yBAA0B,SAAQ,cAAc;IAC/D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,CAAC,EAAE;QACf,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;IACvC,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,EAAE;YACJ,6BAA6B,CAAC,EAAE,MAAM,CAAC;SACxC,CAAC;KACH,CAAC;IACF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC;CACrC;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;AA2B3C,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 __BUNDLE_START_TIME__?: number;\n nativePerformanceNow?: () => number;\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.24.0';\n"]}
|
package/ios/RNSentry.mm
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
#import <Sentry/SentryFormatter.h>
|
|
24
24
|
#import <Sentry/SentryAppStartMeasurement.h>
|
|
25
25
|
#import "RNSentryId.h"
|
|
26
|
+
#import "RNSentryBreadcrumb.h"
|
|
26
27
|
|
|
27
28
|
// This guard prevents importing Hermes in JSC apps
|
|
28
29
|
#if SENTRY_PROFILING_ENABLED
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
|
|
55
56
|
@end
|
|
56
57
|
|
|
57
|
-
static bool
|
|
58
|
+
static bool hasFetchedAppStart;
|
|
58
59
|
|
|
59
60
|
static NSString* const nativeSdkName = @"sentry.cocoa.react-native";
|
|
60
61
|
|
|
@@ -379,24 +380,20 @@ RCT_EXPORT_METHOD(fetchNativeAppStart:(RCTPromiseResolveBlock)resolve
|
|
|
379
380
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
380
381
|
{
|
|
381
382
|
#if SENTRY_HAS_UIKIT
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
if (appStartMeasurement == nil) {
|
|
383
|
+
NSDictionary<NSString *, id> *measurements = [PrivateSentrySDKOnly appStartMeasurementWithSpans];
|
|
384
|
+
if (measurements == nil) {
|
|
385
385
|
resolve(nil);
|
|
386
|
-
|
|
387
|
-
BOOL isColdStart = appStartMeasurement.type == SentryAppStartTypeCold;
|
|
388
|
-
|
|
389
|
-
resolve(@{
|
|
390
|
-
@"isColdStart": [NSNumber numberWithBool:isColdStart],
|
|
391
|
-
@"appStartTime": [NSNumber numberWithDouble:(appStartMeasurement.appStartTimestamp.timeIntervalSince1970 * 1000)],
|
|
392
|
-
@"didFetchAppStart": [NSNumber numberWithBool:didFetchAppStart],
|
|
393
|
-
});
|
|
394
|
-
|
|
386
|
+
return;
|
|
395
387
|
}
|
|
396
388
|
|
|
389
|
+
NSMutableDictionary<NSString *, id> *mutableMeasurements = [[NSMutableDictionary alloc] initWithDictionary:measurements];
|
|
390
|
+
[mutableMeasurements setValue:[NSNumber numberWithBool:hasFetchedAppStart] forKey:@"has_fetched"];
|
|
391
|
+
|
|
397
392
|
// This is always set to true, as we would only allow an app start fetch to only happen once
|
|
398
393
|
// in the case of a JS bundle reload, we do not want it to be instrumented again.
|
|
399
|
-
|
|
394
|
+
hasFetchedAppStart = true;
|
|
395
|
+
|
|
396
|
+
resolve(mutableMeasurements);
|
|
400
397
|
#else
|
|
401
398
|
resolve(nil);
|
|
402
399
|
#endif
|
|
@@ -557,32 +554,7 @@ RCT_EXPORT_METHOD(setUser:(NSDictionary *)userKeys
|
|
|
557
554
|
RCT_EXPORT_METHOD(addBreadcrumb:(NSDictionary *)breadcrumb)
|
|
558
555
|
{
|
|
559
556
|
[SentrySDK configureScope:^(SentryScope * _Nonnull scope) {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
NSString * levelString = breadcrumb[@"level"];
|
|
563
|
-
SentryLevel sentryLevel;
|
|
564
|
-
if ([levelString isEqualToString:@"fatal"]) {
|
|
565
|
-
sentryLevel = kSentryLevelFatal;
|
|
566
|
-
} else if ([levelString isEqualToString:@"warning"]) {
|
|
567
|
-
sentryLevel = kSentryLevelWarning;
|
|
568
|
-
} else if ([levelString isEqualToString:@"error"]) {
|
|
569
|
-
sentryLevel = kSentryLevelError;
|
|
570
|
-
} else if ([levelString isEqualToString:@"debug"]) {
|
|
571
|
-
sentryLevel = kSentryLevelDebug;
|
|
572
|
-
} else {
|
|
573
|
-
sentryLevel = kSentryLevelInfo;
|
|
574
|
-
}
|
|
575
|
-
[breadcrumbInstance setLevel:sentryLevel];
|
|
576
|
-
|
|
577
|
-
[breadcrumbInstance setCategory:breadcrumb[@"category"]];
|
|
578
|
-
|
|
579
|
-
[breadcrumbInstance setType:breadcrumb[@"type"]];
|
|
580
|
-
|
|
581
|
-
[breadcrumbInstance setMessage:breadcrumb[@"message"]];
|
|
582
|
-
|
|
583
|
-
[breadcrumbInstance setData:breadcrumb[@"data"]];
|
|
584
|
-
|
|
585
|
-
[scope addBreadcrumb:breadcrumbInstance];
|
|
557
|
+
[scope addBreadcrumb:[RNSentryBreadcrumb from:breadcrumb]];
|
|
586
558
|
}];
|
|
587
559
|
}
|
|
588
560
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#import "RNSentryBreadcrumb.h"
|
|
2
|
+
@import Sentry;
|
|
3
|
+
|
|
4
|
+
@implementation RNSentryBreadcrumb
|
|
5
|
+
|
|
6
|
+
+(SentryBreadcrumb*) from: (NSDictionary *) dict
|
|
7
|
+
{
|
|
8
|
+
SentryBreadcrumb* crumb = [[SentryBreadcrumb alloc] init];
|
|
9
|
+
|
|
10
|
+
NSString * levelString = dict[@"level"];
|
|
11
|
+
SentryLevel sentryLevel;
|
|
12
|
+
if ([levelString isEqualToString:@"fatal"]) {
|
|
13
|
+
sentryLevel = kSentryLevelFatal;
|
|
14
|
+
} else if ([levelString isEqualToString:@"warning"]) {
|
|
15
|
+
sentryLevel = kSentryLevelWarning;
|
|
16
|
+
} else if ([levelString isEqualToString:@"error"]) {
|
|
17
|
+
sentryLevel = kSentryLevelError;
|
|
18
|
+
} else if ([levelString isEqualToString:@"debug"]) {
|
|
19
|
+
sentryLevel = kSentryLevelDebug;
|
|
20
|
+
} else {
|
|
21
|
+
sentryLevel = kSentryLevelInfo;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[crumb setLevel:sentryLevel];
|
|
25
|
+
[crumb setCategory:dict[@"category"]];
|
|
26
|
+
[crumb setType:dict[@"type"]];
|
|
27
|
+
[crumb setMessage:dict[@"message"]];
|
|
28
|
+
[crumb setData:dict[@"data"]];
|
|
29
|
+
|
|
30
|
+
return crumb;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
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.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",
|
|
@@ -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
|
/**
|
|
@@ -30,7 +30,7 @@ export declare function TimeToFullDisplay(props: TimeToDisplayProps): React.Reac
|
|
|
30
30
|
*
|
|
31
31
|
* Returns current span if already exists in the currently active span.
|
|
32
32
|
*/
|
|
33
|
-
export declare function startTimeToInitialDisplaySpan(options?:
|
|
33
|
+
export declare function startTimeToInitialDisplaySpan(options?: Omit<StartSpanOptions, 'op' | 'name'> & {
|
|
34
34
|
name?: string;
|
|
35
35
|
isAutoInstrumented?: boolean;
|
|
36
36
|
}): Span | undefined;
|
|
@@ -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;
|