@sentry/react-native 5.28.0 → 6.0.0-alpha.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 +113 -0
- package/android/build.gradle +1 -1
- package/dist/js/client.d.ts +5 -9
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +11 -42
- package/dist/js/client.js.map +1 -1
- package/dist/js/index.d.ts +5 -10
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +4 -21
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts +2 -8
- package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
- package/dist/js/integrations/debugsymbolicator.js +1 -9
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +18 -7
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/devicecontext.d.ts +2 -8
- package/dist/js/integrations/devicecontext.d.ts.map +1 -1
- package/dist/js/integrations/devicecontext.js +0 -9
- package/dist/js/integrations/devicecontext.js.map +1 -1
- package/dist/js/integrations/eventorigin.d.ts +2 -8
- package/dist/js/integrations/eventorigin.d.ts.map +1 -1
- package/dist/js/integrations/eventorigin.js +0 -8
- package/dist/js/integrations/eventorigin.js.map +1 -1
- package/dist/js/integrations/expocontext.d.ts +2 -8
- package/dist/js/integrations/expocontext.d.ts.map +1 -1
- package/dist/js/integrations/expocontext.js +0 -8
- package/dist/js/integrations/expocontext.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +4 -0
- package/dist/js/integrations/exports.d.ts.map +1 -1
- package/dist/js/integrations/exports.js +4 -0
- package/dist/js/integrations/exports.js.map +1 -1
- package/dist/js/integrations/modulesloader.d.ts +2 -8
- package/dist/js/integrations/modulesloader.d.ts.map +1 -1
- package/dist/js/integrations/modulesloader.js +0 -8
- package/dist/js/integrations/modulesloader.js.map +1 -1
- package/dist/js/integrations/nativelinkederrors.d.ts +2 -8
- package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
- package/dist/js/integrations/nativelinkederrors.js +0 -8
- package/dist/js/integrations/nativelinkederrors.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +2 -8
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +1 -8
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/reactnativeinfo.d.ts +2 -8
- package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeinfo.js +0 -8
- package/dist/js/integrations/reactnativeinfo.js.map +1 -1
- package/dist/js/integrations/release.d.ts +2 -8
- package/dist/js/integrations/release.d.ts.map +1 -1
- package/dist/js/integrations/release.js +0 -8
- package/dist/js/integrations/release.js.map +1 -1
- package/dist/js/integrations/rewriteframes.js +1 -1
- package/dist/js/integrations/rewriteframes.js.map +1 -1
- package/dist/js/integrations/screenshot.d.ts +2 -8
- package/dist/js/integrations/screenshot.d.ts.map +1 -1
- package/dist/js/integrations/screenshot.js +2 -11
- package/dist/js/integrations/screenshot.js.map +1 -1
- package/dist/js/integrations/sdkinfo.d.ts +2 -8
- package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
- package/dist/js/integrations/sdkinfo.js +0 -8
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/integrations/spotlight.d.ts +2 -10
- package/dist/js/integrations/spotlight.d.ts.map +1 -1
- package/dist/js/integrations/spotlight.js +1 -10
- package/dist/js/integrations/spotlight.js.map +1 -1
- package/dist/js/integrations/viewhierarchy.d.ts +2 -8
- package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
- package/dist/js/integrations/viewhierarchy.js +0 -8
- package/dist/js/integrations/viewhierarchy.js.map +1 -1
- package/dist/js/options.d.ts +43 -0
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/profiling/cache.d.ts +1 -1
- package/dist/js/profiling/hermes.d.ts +1 -1
- package/dist/js/profiling/hermes.d.ts.map +1 -1
- package/dist/js/profiling/integration.d.ts +1 -7
- package/dist/js/profiling/integration.d.ts.map +1 -1
- package/dist/js/profiling/integration.js +39 -25
- package/dist/js/profiling/integration.js.map +1 -1
- package/dist/js/profiling/utils.js +2 -1
- package/dist/js/profiling/utils.js.map +1 -1
- package/dist/js/replay/mobilereplay.d.ts +2 -2
- package/dist/js/replay/mobilereplay.d.ts.map +1 -1
- package/dist/js/replay/mobilereplay.js.map +1 -1
- package/dist/js/scopeSync.d.ts +6 -0
- package/dist/js/scopeSync.d.ts.map +1 -0
- package/dist/js/scopeSync.js +60 -0
- package/dist/js/scopeSync.js.map +1 -0
- package/dist/js/sdk.d.ts +1 -20
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +20 -53
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
- package/dist/js/touchevents.d.ts +0 -1
- package/dist/js/touchevents.d.ts.map +1 -1
- package/dist/js/touchevents.js +5 -9
- package/dist/js/touchevents.js.map +1 -1
- package/dist/js/tracing/gesturetracing.d.ts +1 -6
- package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
- package/dist/js/tracing/gesturetracing.js +8 -12
- package/dist/js/tracing/gesturetracing.js.map +1 -1
- package/dist/js/tracing/index.d.ts +6 -7
- package/dist/js/tracing/index.d.ts.map +1 -1
- package/dist/js/tracing/index.js +4 -7
- package/dist/js/tracing/index.js.map +1 -1
- package/dist/js/tracing/integrations/appStart.d.ts +39 -0
- package/dist/js/tracing/integrations/appStart.d.ts.map +1 -0
- package/dist/js/tracing/integrations/appStart.js +301 -0
- package/dist/js/tracing/integrations/appStart.js.map +1 -0
- package/dist/js/tracing/integrations/nativeFrames.d.ts +20 -0
- package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -0
- package/dist/js/tracing/integrations/nativeFrames.js +256 -0
- package/dist/js/tracing/integrations/nativeFrames.js.map +1 -0
- package/dist/js/tracing/integrations/stalltracking.d.ts +31 -0
- package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -0
- package/dist/js/tracing/integrations/stalltracking.js +236 -0
- package/dist/js/tracing/integrations/stalltracking.js.map +1 -0
- package/dist/js/tracing/integrations/userInteraction.d.ts +11 -0
- package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -0
- package/dist/js/tracing/integrations/userInteraction.js +70 -0
- package/dist/js/tracing/integrations/userInteraction.js.map +1 -0
- package/dist/js/tracing/onSpanEndUtils.d.ts +17 -0
- package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -0
- package/dist/js/tracing/onSpanEndUtils.js +112 -0
- package/dist/js/tracing/onSpanEndUtils.js.map +1 -0
- package/dist/js/tracing/origin.d.ts +2 -0
- package/dist/js/tracing/origin.d.ts.map +1 -0
- package/dist/js/tracing/origin.js +2 -0
- package/dist/js/tracing/origin.js.map +1 -0
- package/dist/js/tracing/reactnativenavigation.d.ts +21 -39
- package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnativenavigation.js +98 -87
- package/dist/js/tracing/reactnativenavigation.js.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.js +6 -13
- package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +44 -160
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +51 -481
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/reactnavigation.d.ts +18 -63
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js +197 -218
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/semanticAttributes.d.ts +12 -0
- package/dist/js/tracing/semanticAttributes.d.ts.map +1 -0
- package/dist/js/tracing/semanticAttributes.js +12 -0
- package/dist/js/tracing/semanticAttributes.js.map +1 -0
- package/dist/js/tracing/span.d.ts +52 -0
- package/dist/js/tracing/span.d.ts.map +1 -0
- package/dist/js/tracing/span.js +82 -0
- package/dist/js/tracing/span.js.map +1 -0
- package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplay.js +16 -29
- package/dist/js/tracing/timetodisplay.js.map +1 -1
- package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplaynative.js +5 -3
- package/dist/js/tracing/timetodisplaynative.js.map +1 -1
- package/dist/js/tracing/types.d.ts +2 -9
- 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 +23 -12
- package/dist/js/tracing/utils.d.ts.map +1 -1
- package/dist/js/tracing/utils.js +48 -52
- package/dist/js/tracing/utils.js.map +1 -1
- package/dist/js/transports/encodePolyfill.d.ts +3 -0
- package/dist/js/transports/encodePolyfill.d.ts.map +1 -0
- package/dist/js/transports/encodePolyfill.js +13 -0
- package/dist/js/transports/encodePolyfill.js.map +1 -0
- package/dist/js/transports/native.d.ts +2 -2
- package/dist/js/transports/native.d.ts.map +1 -1
- package/dist/js/transports/native.js +2 -1
- package/dist/js/transports/native.js.map +1 -1
- package/dist/js/utils/fill.d.ts +7 -0
- package/dist/js/utils/fill.d.ts.map +1 -0
- package/dist/js/utils/fill.js +9 -0
- package/dist/js/utils/fill.js.map +1 -0
- package/dist/js/utils/normalize.d.ts.map +1 -1
- package/dist/js/utils/normalize.js +8 -5
- package/dist/js/utils/normalize.js.map +1 -1
- package/dist/js/utils/rnlibraries.d.ts.map +1 -1
- package/dist/js/utils/rnlibraries.js +6 -0
- package/dist/js/utils/rnlibraries.js.map +1 -1
- package/dist/js/utils/rnlibrariesinterface.d.ts +3 -0
- package/dist/js/utils/rnlibrariesinterface.d.ts.map +1 -1
- package/dist/js/utils/rnlibrariesinterface.js.map +1 -1
- package/dist/js/utils/span.d.ts +19 -0
- package/dist/js/utils/span.d.ts.map +1 -0
- package/dist/js/utils/span.js +29 -0
- package/dist/js/utils/span.js.map +1 -0
- package/dist/js/vendor/react-native/index.d.ts +5 -1
- package/dist/js/vendor/react-native/index.d.ts.map +1 -1
- package/dist/js/vendor/react-native/index.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.d.ts.map +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +1 -0
- package/dist/js/wrapper.js.map +1 -1
- package/package.json +12 -13
- package/ts3.8/dist/js/client.d.ts +5 -9
- package/ts3.8/dist/js/index.d.ts +5 -10
- package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +2 -8
- package/ts3.8/dist/js/integrations/devicecontext.d.ts +2 -8
- package/ts3.8/dist/js/integrations/eventorigin.d.ts +2 -8
- package/ts3.8/dist/js/integrations/expocontext.d.ts +2 -8
- package/ts3.8/dist/js/integrations/exports.d.ts +4 -0
- package/ts3.8/dist/js/integrations/modulesloader.d.ts +2 -8
- package/ts3.8/dist/js/integrations/nativelinkederrors.d.ts +2 -8
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +2 -8
- package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +2 -8
- package/ts3.8/dist/js/integrations/release.d.ts +2 -8
- package/ts3.8/dist/js/integrations/screenshot.d.ts +2 -8
- package/ts3.8/dist/js/integrations/sdkinfo.d.ts +2 -8
- package/ts3.8/dist/js/integrations/spotlight.d.ts +2 -10
- package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +2 -8
- package/ts3.8/dist/js/options.d.ts +43 -0
- package/ts3.8/dist/js/profiling/cache.d.ts +1 -1
- package/ts3.8/dist/js/profiling/hermes.d.ts +1 -1
- package/ts3.8/dist/js/profiling/integration.d.ts +1 -7
- package/ts3.8/dist/js/replay/mobilereplay.d.ts +2 -2
- package/ts3.8/dist/js/scopeSync.d.ts +6 -0
- package/ts3.8/dist/js/sdk.d.ts +1 -20
- package/ts3.8/dist/js/touchevents.d.ts +0 -1
- package/ts3.8/dist/js/tracing/gesturetracing.d.ts +1 -6
- package/ts3.8/dist/js/tracing/index.d.ts +6 -7
- package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +39 -0
- package/ts3.8/dist/js/tracing/integrations/nativeFrames.d.ts +20 -0
- package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +31 -0
- package/ts3.8/dist/js/tracing/integrations/userInteraction.d.ts +11 -0
- package/ts3.8/dist/js/tracing/onSpanEndUtils.d.ts +17 -0
- package/ts3.8/dist/js/tracing/origin.d.ts +2 -0
- package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +21 -39
- package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +44 -160
- package/ts3.8/dist/js/tracing/reactnavigation.d.ts +18 -63
- package/ts3.8/dist/js/tracing/semanticAttributes.d.ts +12 -0
- package/ts3.8/dist/js/tracing/span.d.ts +52 -0
- package/ts3.8/dist/js/tracing/types.d.ts +2 -9
- package/ts3.8/dist/js/tracing/utils.d.ts +23 -12
- package/ts3.8/dist/js/transports/encodePolyfill.d.ts +3 -0
- package/ts3.8/dist/js/transports/native.d.ts +2 -2
- package/ts3.8/dist/js/utils/fill.d.ts +7 -0
- package/ts3.8/dist/js/utils/rnlibrariesinterface.d.ts +3 -0
- package/ts3.8/dist/js/utils/span.d.ts +19 -0
- package/ts3.8/dist/js/vendor/react-native/index.d.ts +5 -1
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/dist/js/integrations/index.d.ts +0 -16
- package/dist/js/integrations/index.d.ts.map +0 -1
- package/dist/js/integrations/index.js +0 -17
- package/dist/js/integrations/index.js.map +0 -1
- package/dist/js/scope.d.ts +0 -54
- package/dist/js/scope.d.ts.map +0 -1
- package/dist/js/scope.js +0 -89
- package/dist/js/scope.js.map +0 -1
- package/dist/js/tracing/addTracingExtensions.d.ts +0 -8
- package/dist/js/tracing/addTracingExtensions.d.ts.map +0 -1
- package/dist/js/tracing/addTracingExtensions.js +0 -66
- package/dist/js/tracing/addTracingExtensions.js.map +0 -1
- package/dist/js/tracing/nativeframes.d.ts +0 -60
- package/dist/js/tracing/nativeframes.d.ts.map +0 -1
- package/dist/js/tracing/nativeframes.js +0 -210
- package/dist/js/tracing/nativeframes.js.map +0 -1
- package/dist/js/tracing/reactnavigationv4.d.ts +0 -92
- package/dist/js/tracing/reactnavigationv4.d.ts.map +0 -1
- package/dist/js/tracing/reactnavigationv4.js +0 -229
- package/dist/js/tracing/reactnavigationv4.js.map +0 -1
- package/dist/js/tracing/routingInstrumentation.d.ts +0 -52
- package/dist/js/tracing/routingInstrumentation.d.ts.map +0 -1
- package/dist/js/tracing/routingInstrumentation.js +0 -36
- package/dist/js/tracing/routingInstrumentation.js.map +0 -1
- package/dist/js/tracing/stalltracking.d.ts +0 -99
- package/dist/js/tracing/stalltracking.d.ts.map +0 -1
- package/dist/js/tracing/stalltracking.js +0 -286
- package/dist/js/tracing/stalltracking.js.map +0 -1
- package/dist/js/tracing/transaction.d.ts +0 -11
- package/dist/js/tracing/transaction.d.ts.map +0 -1
- package/dist/js/tracing/transaction.js +0 -37
- package/dist/js/tracing/transaction.js.map +0 -1
- package/dist/js/transports/TextEncoder.d.ts +0 -3
- package/dist/js/transports/TextEncoder.d.ts.map +0 -1
- package/dist/js/transports/TextEncoder.js +0 -12
- package/dist/js/transports/TextEncoder.js.map +0 -1
- package/ts3.8/dist/js/integrations/index.d.ts +0 -16
- package/ts3.8/dist/js/scope.d.ts +0 -54
- package/ts3.8/dist/js/tracing/addTracingExtensions.d.ts +0 -8
- package/ts3.8/dist/js/tracing/nativeframes.d.ts +0 -60
- package/ts3.8/dist/js/tracing/reactnavigationv4.d.ts +0 -92
- package/ts3.8/dist/js/tracing/routingInstrumentation.d.ts +0 -52
- package/ts3.8/dist/js/tracing/stalltracking.d.ts +0 -99
- package/ts3.8/dist/js/tracing/transaction.d.ts +0 -11
- package/ts3.8/dist/js/transports/TextEncoder.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
2
|
export declare const MOBILE_REPLAY_INTEGRATION_NAME = "MobileReplay";
|
|
3
3
|
export interface MobileReplayOptions {
|
|
4
4
|
/**
|
|
@@ -21,7 +21,7 @@ export interface MobileReplayOptions {
|
|
|
21
21
|
*/
|
|
22
22
|
maskAllVectors?: boolean;
|
|
23
23
|
}
|
|
24
|
-
type MobileReplayIntegration =
|
|
24
|
+
type MobileReplayIntegration = Integration & {
|
|
25
25
|
options: Required<MobileReplayOptions>;
|
|
26
26
|
};
|
|
27
27
|
/**
|
package/ts3.8/dist/js/sdk.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { Scope } from '@sentry/
|
|
2
|
-
import { Hub } from '@sentry/core';
|
|
3
|
-
import type { UserFeedback } from '@sentry/types';
|
|
1
|
+
import type { Scope, UserFeedback } from '@sentry/types';
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
import type { ReactNativeOptions, ReactNativeWrapperOptions } from './options';
|
|
6
4
|
/**
|
|
@@ -11,18 +9,6 @@ export declare function init(passedOptions: ReactNativeOptions): void;
|
|
|
11
9
|
* Inits the Sentry React Native SDK with automatic instrumentation and wrapped features.
|
|
12
10
|
*/
|
|
13
11
|
export declare function wrap<P extends Record<string, unknown>>(RootComponent: React.ComponentType<P>, options?: ReactNativeWrapperOptions): React.ComponentType<P>;
|
|
14
|
-
/**
|
|
15
|
-
* Deprecated. Sets the release on the event.
|
|
16
|
-
* NOTE: Does not set the release on sessions.
|
|
17
|
-
* @deprecated
|
|
18
|
-
*/
|
|
19
|
-
export declare function setRelease(release: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Deprecated. Sets the dist on the event.
|
|
22
|
-
* NOTE: Does not set the dist on sessions.
|
|
23
|
-
* @deprecated
|
|
24
|
-
*/
|
|
25
|
-
export declare function setDist(dist: string): void;
|
|
26
12
|
/**
|
|
27
13
|
* If native client is available it will trigger a native crash.
|
|
28
14
|
* Use this only for testing purposes.
|
|
@@ -55,9 +41,4 @@ export declare function captureUserFeedback(feedback: UserFeedback): void;
|
|
|
55
41
|
* @param callback that will be enclosed into push/popScope.
|
|
56
42
|
*/
|
|
57
43
|
export declare function withScope<T>(callback: (scope: Scope) => T): T | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Callback to set context information onto the scope.
|
|
60
|
-
* @param callback Callback function that receives Scope.
|
|
61
|
-
*/
|
|
62
|
-
export declare function configureScope(callback: (scope: Scope) => void): ReturnType<Hub['configureScope']>;
|
|
63
44
|
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -38,7 +38,6 @@ declare class TouchEventBoundary extends React.Component<TouchEventBoundaryProps
|
|
|
38
38
|
static displayName: string;
|
|
39
39
|
static defaultProps: Partial<TouchEventBoundaryProps>;
|
|
40
40
|
readonly name: string;
|
|
41
|
-
private _tracingIntegration;
|
|
42
41
|
/**
|
|
43
42
|
* Registers the TouchEventBoundary as a Sentry Integration.
|
|
44
43
|
*/
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { Hub } from '@sentry/types';
|
|
2
1
|
export declare const DEFAULT_BREADCRUMB_CATEGORY = "gesture";
|
|
3
2
|
export declare const DEFAULT_BREADCRUMB_TYPE = "user";
|
|
4
3
|
export declare const GESTURE_POSTFIX_LENGTH: number;
|
|
5
4
|
export declare const ACTION_GESTURE_FALLBACK = "gesture";
|
|
6
|
-
interface GestureTracingOptions {
|
|
7
|
-
getCurrentHub: () => Hub;
|
|
8
|
-
}
|
|
9
5
|
/**
|
|
10
6
|
* Patches React Native Gesture Handler v2 Gesture to start a transaction on gesture begin with the appropriate label.
|
|
11
7
|
* Example: ShoppingCartScreen.dismissGesture
|
|
@@ -15,6 +11,5 @@ export declare function sentryTraceGesture<GestureT>(
|
|
|
15
11
|
* Label of the gesture to be used in transaction name.
|
|
16
12
|
* Example: dismissGesture
|
|
17
13
|
*/
|
|
18
|
-
label: string, gesture: GestureT
|
|
19
|
-
export {};
|
|
14
|
+
label: string, gesture: GestureT): GestureT;
|
|
20
15
|
//# sourceMappingURL=gesturetracing.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export type { ReactNavigationCurrentRoute, ReactNavigationRoute, ReactNavigationTransactionContext } from './types';
|
|
1
|
+
export { reactNativeTracingIntegration, INTEGRATION_NAME as REACT_NATIVE_TRACING_INTEGRATION_NAME, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, } from './reactnativetracing';
|
|
2
|
+
export type { ReactNativeTracingIntegration } from './reactnativetracing';
|
|
3
|
+
export { reactNavigationIntegration } from './reactnavigation';
|
|
4
|
+
export { reactNativeNavigationIntegration } from './reactnativenavigation';
|
|
5
|
+
export { startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions } from './span';
|
|
6
|
+
export type { ReactNavigationCurrentRoute, ReactNavigationRoute } from './types';
|
|
8
7
|
export { ReactNativeProfiler } from './reactnativeprofiler';
|
|
9
8
|
export { sentryTraceGesture } from './gesturetracing';
|
|
10
9
|
export * from './ops';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
export type AppStartIntegration = Integration & {
|
|
3
|
+
captureStandaloneAppStart: () => Promise<void>;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Records the application start end.
|
|
7
|
+
* Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function captureAppStart(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Sets the root component first constructor call timestamp.
|
|
12
|
+
* Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setRootComponentCreationTimestampMs(timestampMs: number): void;
|
|
15
|
+
/**
|
|
16
|
+
* For internal use only.
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
export declare const _setAppStartEndTimestampMs: (timestampMs: number) => void;
|
|
21
|
+
/**
|
|
22
|
+
* For testing purposes only.
|
|
23
|
+
*
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
export declare function _clearRootComponentCreationTimestampMs(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Adds AppStart spans from the native layer to the transaction event.
|
|
29
|
+
*/
|
|
30
|
+
export declare const appStartIntegration: ({ standalone, }?: {
|
|
31
|
+
/**
|
|
32
|
+
* Should the integration send App Start as a standalone root span (transaction)?
|
|
33
|
+
* If false, App Start will be added as a child span to the first transaction.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
standalone?: boolean;
|
|
38
|
+
}) => AppStartIntegration;
|
|
39
|
+
//# sourceMappingURL=appStart.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Integration, Measurements, MeasurementUnit } from '@sentry/types';
|
|
2
|
+
export interface FramesMeasurements extends Measurements {
|
|
3
|
+
frames_total: {
|
|
4
|
+
value: number;
|
|
5
|
+
unit: MeasurementUnit;
|
|
6
|
+
};
|
|
7
|
+
frames_slow: {
|
|
8
|
+
value: number;
|
|
9
|
+
unit: MeasurementUnit;
|
|
10
|
+
};
|
|
11
|
+
frames_frozen: {
|
|
12
|
+
value: number;
|
|
13
|
+
unit: MeasurementUnit;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Instrumentation to add native slow/frozen frames measurements onto transactions.
|
|
18
|
+
*/
|
|
19
|
+
export declare const nativeFramesIntegration: () => Integration;
|
|
20
|
+
//# sourceMappingURL=nativeFrames.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Integration, Measurements, MeasurementUnit } from '@sentry/types';
|
|
2
|
+
import { STALL_COUNT, STALL_LONGEST_TIME, STALL_TOTAL_TIME } from '../../measurements';
|
|
3
|
+
export interface StallMeasurements extends Measurements {
|
|
4
|
+
[STALL_COUNT]: {
|
|
5
|
+
value: number;
|
|
6
|
+
unit: MeasurementUnit;
|
|
7
|
+
};
|
|
8
|
+
[STALL_TOTAL_TIME]: {
|
|
9
|
+
value: number;
|
|
10
|
+
unit: MeasurementUnit;
|
|
11
|
+
};
|
|
12
|
+
[STALL_LONGEST_TIME]: {
|
|
13
|
+
value: number;
|
|
14
|
+
unit: MeasurementUnit;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Stall measurement tracker inspired by the `JSEventLoopWatchdog` used internally in React Native:
|
|
19
|
+
* https://github.com/facebook/react-native/blob/006f5afe120c290a37cf6ff896748fbc062bf7ed/Libraries/Interaction/JSEventLoopWatchdog.js
|
|
20
|
+
*
|
|
21
|
+
* However, we modified the interval implementation to instead have a fixed loop timeout interval of `LOOP_TIMEOUT_INTERVAL_MS`.
|
|
22
|
+
* We then would consider that iteration a stall when the total time for that interval to run is greater than `LOOP_TIMEOUT_INTERVAL_MS + minimumStallThreshold`
|
|
23
|
+
*/
|
|
24
|
+
export declare const stallTrackingIntegration: ({ minimumStallThresholdMs, }?: {
|
|
25
|
+
/**
|
|
26
|
+
* How long in milliseconds an event loop iteration can be delayed for before being considered a "stall."
|
|
27
|
+
* @default 50
|
|
28
|
+
*/
|
|
29
|
+
minimumStallThresholdMs?: number;
|
|
30
|
+
}) => Integration;
|
|
31
|
+
//# sourceMappingURL=stalltracking.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Integration, Span } from '@sentry/types';
|
|
2
|
+
export declare const userInteractionIntegration: () => Integration;
|
|
3
|
+
/**
|
|
4
|
+
* Starts a new transaction for a user interaction.
|
|
5
|
+
* @param userInteractionId Consists of `op` representation UI Event and `elementId` unique element identifier on current screen.
|
|
6
|
+
*/
|
|
7
|
+
export declare const startUserInteractionSpan: (userInteractionId: {
|
|
8
|
+
elementId: string | undefined;
|
|
9
|
+
op: string;
|
|
10
|
+
}) => Span | undefined;
|
|
11
|
+
//# sourceMappingURL=userInteraction.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Client, Span } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* Hooks on span end event to execute a callback when the span ends.
|
|
4
|
+
*/
|
|
5
|
+
export declare function onThisSpanEnd(client: Client, span: Span, callback: (span: Span) => void): void;
|
|
6
|
+
export declare const adjustTransactionDuration: (client: Client, span: Span, maxDurationMs: number) => void;
|
|
7
|
+
export declare const ignoreEmptyBackNavigation: (client: Client | undefined, span: Span) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Idle Transaction callback to only sample transactions with child spans.
|
|
10
|
+
* To avoid side effects of other callbacks this should be hooked as the last callback.
|
|
11
|
+
*/
|
|
12
|
+
export declare const onlySampleIfChildSpans: (client: Client, span: Span) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Hooks on AppState change to cancel the span if the app goes background.
|
|
15
|
+
*/
|
|
16
|
+
export declare const cancelInBackground: (client: Client, span: Span) => void;
|
|
17
|
+
//# sourceMappingURL=onSpanEndUtils.d.ts.map
|
|
@@ -1,23 +1,35 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
1
2
|
import type { EmitterSubscription } from '../utils/rnlibrariesinterface';
|
|
2
|
-
|
|
3
|
-
import { InternalRoutingInstrumentation } from './routingInstrumentation';
|
|
4
|
-
import type { BeforeNavigate } from './types';
|
|
3
|
+
export declare const INTEGRATION_NAME = "ReactNativeNavigation";
|
|
5
4
|
interface ReactNativeNavigationOptions {
|
|
6
5
|
/**
|
|
7
6
|
* How long the instrumentation will wait for the route to mount after a change has been initiated,
|
|
8
7
|
* before the transaction is discarded.
|
|
9
|
-
* Time is in ms.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
9
|
+
* @default 1_000 (ms)
|
|
12
10
|
*/
|
|
13
|
-
routeChangeTimeoutMs
|
|
11
|
+
routeChangeTimeoutMs?: number;
|
|
14
12
|
/**
|
|
15
13
|
* Instrumentation will create a transaction on tab change.
|
|
16
14
|
* By default only navigation commands create transactions.
|
|
17
15
|
*
|
|
18
|
-
*
|
|
16
|
+
* @default false
|
|
19
17
|
*/
|
|
20
|
-
enableTabsInstrumentation
|
|
18
|
+
enableTabsInstrumentation?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Does not sample transactions that are from routes that have been seen any more and don't have any spans.
|
|
21
|
+
* This removes a lot of the clutter as most back navigation transactions are now ignored.
|
|
22
|
+
*
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
ignoreEmptyBackNavigationTransactions?: boolean;
|
|
26
|
+
/** The React Native Navigation `NavigationDelegate`.
|
|
27
|
+
*
|
|
28
|
+
* ```js
|
|
29
|
+
* import { Navigation } from 'react-native-navigation';
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
navigation: unknown;
|
|
21
33
|
}
|
|
22
34
|
interface ComponentEvent {
|
|
23
35
|
componentId: string;
|
|
@@ -50,36 +62,6 @@ export interface NavigationDelegate {
|
|
|
50
62
|
* - `_onComponentWillAppear` is then called AFTER the state change happens due to a dispatch and sets the route context onto the active transaction.
|
|
51
63
|
* - If `_onComponentWillAppear` isn't called within `options.routeChangeTimeoutMs` of the dispatch, then the transaction is not sampled and finished.
|
|
52
64
|
*/
|
|
53
|
-
export declare
|
|
54
|
-
static instrumentationName: string;
|
|
55
|
-
readonly name: string;
|
|
56
|
-
private _navigation;
|
|
57
|
-
private _options;
|
|
58
|
-
private _prevComponentEvent;
|
|
59
|
-
private _latestTransaction?;
|
|
60
|
-
private _recentComponentIds;
|
|
61
|
-
private _stateChangeTimeout?;
|
|
62
|
-
constructor(
|
|
63
|
-
/** The react native navigation `NavigationDelegate`. This is usually the import named `Navigation`. */
|
|
64
|
-
navigation: unknown, options?: Partial<ReactNativeNavigationOptions>);
|
|
65
|
-
/**
|
|
66
|
-
* Registers the event listeners for React Native Navigation
|
|
67
|
-
*/
|
|
68
|
-
registerRoutingInstrumentation(listener: TransactionCreator, beforeNavigate: BeforeNavigate, onConfirmRoute: OnConfirmRoute): void;
|
|
69
|
-
/**
|
|
70
|
-
* To be called when a navigation is initiated. (Command, BottomTabSelected, etc.)
|
|
71
|
-
*/
|
|
72
|
-
private _onNavigation;
|
|
73
|
-
/**
|
|
74
|
-
* To be called AFTER the state has been changed to populate the transaction with the current route.
|
|
75
|
-
*/
|
|
76
|
-
private _onComponentWillAppear;
|
|
77
|
-
/** Creates final transaction context before confirmation */
|
|
78
|
-
private _prepareFinalContext;
|
|
79
|
-
/** Cancels the latest transaction so it does not get sent to Sentry. */
|
|
80
|
-
private _discardLatestTransaction;
|
|
81
|
-
/** Cancels the latest transaction so it does not get sent to Sentry. */
|
|
82
|
-
private _clearStateChangeTimeout;
|
|
83
|
-
}
|
|
65
|
+
export declare const reactNativeNavigationIntegration: ({ navigation: optionsNavigation, routeChangeTimeoutMs, enableTabsInstrumentation, ignoreEmptyBackNavigationTransactions, }: ReactNativeNavigationOptions) => Integration;
|
|
84
66
|
export {};
|
|
85
67
|
//# sourceMappingURL=reactnativenavigation.d.ts.map
|
|
@@ -1,183 +1,67 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { RoutingInstrumentationInstance } from '../tracing/routingInstrumentation';
|
|
5
|
-
import { NativeFramesInstrumentation } from './nativeframes';
|
|
6
|
-
import { StallTrackingInstrumentation } from './stalltracking';
|
|
7
|
-
import type { BeforeNavigate } from './types';
|
|
8
|
-
export interface ReactNativeTracingOptions extends RequestInstrumentationOptions {
|
|
1
|
+
import type { Client, Integration, StartSpanOptions } from '@sentry/types';
|
|
2
|
+
export declare const INTEGRATION_NAME = "ReactNativeTracing";
|
|
3
|
+
export interface ReactNativeTracingOptions {
|
|
9
4
|
/**
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
idleTimeout: number;
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Replaced by maxTransactionDurationMs
|
|
15
|
-
*/
|
|
16
|
-
maxTransactionDuration: number;
|
|
17
|
-
/**
|
|
18
|
-
* The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of
|
|
19
|
-
* the last finished span as the endtime for the transaction.
|
|
20
|
-
* Time is in ms.
|
|
5
|
+
* The time that has to pass without any span being created.
|
|
6
|
+
* If this time is exceeded, the idle span will finish.
|
|
21
7
|
*
|
|
22
|
-
*
|
|
8
|
+
* @default 1_000 (ms)
|
|
23
9
|
*/
|
|
24
|
-
idleTimeoutMs
|
|
10
|
+
idleTimeoutMs?: number;
|
|
25
11
|
/**
|
|
26
|
-
* The
|
|
27
|
-
*
|
|
28
|
-
* If you never want to mark a transaction set it to 0.
|
|
29
|
-
* Time is in ms.
|
|
12
|
+
* The max. time an idle span may run.
|
|
13
|
+
* If this time is exceeded, the idle span will finish no matter what.
|
|
30
14
|
*
|
|
31
|
-
*
|
|
15
|
+
* @default 60_0000 (ms)
|
|
32
16
|
*/
|
|
33
|
-
finalTimeoutMs
|
|
17
|
+
finalTimeoutMs?: number;
|
|
34
18
|
/**
|
|
35
|
-
*
|
|
36
|
-
* There is no routing instrumentation if nothing is passed.
|
|
37
|
-
*/
|
|
38
|
-
routingInstrumentation?: RoutingInstrumentationInstance;
|
|
39
|
-
/**
|
|
40
|
-
* Does not sample transactions that are from routes that have been seen any more and don't have any spans.
|
|
41
|
-
* This removes a lot of the clutter as most back navigation transactions are now ignored.
|
|
19
|
+
* Flag to disable patching all together for fetch requests.
|
|
42
20
|
*
|
|
43
|
-
*
|
|
21
|
+
* @default true
|
|
44
22
|
*/
|
|
45
|
-
|
|
23
|
+
traceFetch: boolean;
|
|
46
24
|
/**
|
|
47
|
-
*
|
|
48
|
-
* context data, or drop the transaction entirely (by setting `sampled = false` in the context).
|
|
49
|
-
*
|
|
50
|
-
* @param context: The context data which will be passed to `startTransaction` by default
|
|
25
|
+
* Flag to disable patching all together for xhr requests.
|
|
51
26
|
*
|
|
52
|
-
* @
|
|
27
|
+
* @default true
|
|
53
28
|
*/
|
|
54
|
-
|
|
29
|
+
traceXHR: boolean;
|
|
55
30
|
/**
|
|
56
|
-
*
|
|
57
|
-
* an app start transaction will be started.
|
|
31
|
+
* If true, Sentry will capture http timings and add them to the corresponding http spans.
|
|
58
32
|
*
|
|
59
|
-
*
|
|
33
|
+
* @default true
|
|
60
34
|
*/
|
|
61
|
-
|
|
35
|
+
enableHTTPTimings: boolean;
|
|
62
36
|
/**
|
|
63
|
-
*
|
|
37
|
+
* A callback which is called before a span for a navigation is started.
|
|
38
|
+
* It receives the options passed to `startSpan`, and expects to return an updated options object.
|
|
64
39
|
*/
|
|
65
|
-
|
|
40
|
+
beforeStartSpan?: (options: StartSpanOptions) => StartSpanOptions;
|
|
66
41
|
/**
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* Trace User Interaction events like touch and gestures.
|
|
42
|
+
* This function will be called before creating a span for a request with the given url.
|
|
43
|
+
* Return false if you don't want a span for the given url.
|
|
44
|
+
*
|
|
45
|
+
* @default (url: string) => true
|
|
72
46
|
*/
|
|
73
|
-
|
|
47
|
+
shouldCreateSpanForRequest?(this: void, url: string): boolean;
|
|
74
48
|
}
|
|
49
|
+
export declare const defaultReactNativeTracingOptions: ReactNativeTracingOptions;
|
|
50
|
+
export type ReactNativeTracingState = {
|
|
51
|
+
currentRoute: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
export declare const reactNativeTracingIntegration: (options?: Partial<ReactNativeTracingOptions>) => Integration & {
|
|
54
|
+
options: ReactNativeTracingOptions;
|
|
55
|
+
state: ReactNativeTracingState;
|
|
56
|
+
setCurrentRoute: (route: string) => void;
|
|
57
|
+
};
|
|
58
|
+
export type ReactNativeTracingIntegration = ReturnType<typeof reactNativeTracingIntegration>;
|
|
75
59
|
/**
|
|
76
|
-
*
|
|
60
|
+
* Returns the current React Native Tracing integration.
|
|
77
61
|
*/
|
|
78
|
-
export declare
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/** We filter out App starts more than 60s */
|
|
84
|
-
private static _maxAppStart;
|
|
85
|
-
/** We filter out App starts which timestamp is 60s and more before the transaction start */
|
|
86
|
-
private static _maxAppStartBeforeTransactionMs;
|
|
87
|
-
/**
|
|
88
|
-
* @inheritDoc
|
|
89
|
-
*/
|
|
90
|
-
name: string;
|
|
91
|
-
/** ReactNativeTracing options */
|
|
92
|
-
options: ReactNativeTracingOptions;
|
|
93
|
-
nativeFramesInstrumentation?: NativeFramesInstrumentation;
|
|
94
|
-
stallTrackingInstrumentation?: StallTrackingInstrumentation;
|
|
95
|
-
useAppStartWithProfiler: boolean;
|
|
96
|
-
private _inflightInteractionTransaction?;
|
|
97
|
-
private _getCurrentHub?;
|
|
98
|
-
private _awaitingAppStartData?;
|
|
99
|
-
private _appStartFinishTimestamp?;
|
|
100
|
-
private _currentRoute?;
|
|
101
|
-
private _hasSetTracePropagationTargets;
|
|
102
|
-
private _hasSetTracingOrigins;
|
|
103
|
-
private _currentViewName;
|
|
104
|
-
private _firstConstructorCallTimestampMs;
|
|
105
|
-
constructor(options?: Partial<ReactNativeTracingOptions>);
|
|
106
|
-
/**
|
|
107
|
-
* Registers routing and request instrumentation.
|
|
108
|
-
*/
|
|
109
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): Promise<void>;
|
|
110
|
-
/**
|
|
111
|
-
* To be called on a transaction start. Can have async methods
|
|
112
|
-
*/
|
|
113
|
-
onTransactionStart(transaction: Transaction): void;
|
|
114
|
-
/**
|
|
115
|
-
* To be called on a transaction finish. Cannot have async methods.
|
|
116
|
-
*/
|
|
117
|
-
onTransactionFinish(transaction: Transaction, endTimestamp?: number): void;
|
|
118
|
-
/**
|
|
119
|
-
* Called by the ReactNativeProfiler component on first component mount.
|
|
120
|
-
*/
|
|
121
|
-
onAppStartFinish(endTimestamp: number): void;
|
|
122
|
-
/**
|
|
123
|
-
* Sets the root component first constructor call timestamp.
|
|
124
|
-
*/
|
|
125
|
-
setRootComponentFirstConstructorCallTimestampMs(timestamp: number): void;
|
|
126
|
-
/**
|
|
127
|
-
* Starts a new transaction for a user interaction.
|
|
128
|
-
* @param userInteractionId Consists of `op` representation UI Event and `elementId` unique element identifier on current screen.
|
|
129
|
-
*/
|
|
130
|
-
startUserInteractionTransaction(userInteractionId: {
|
|
131
|
-
elementId: string | undefined;
|
|
132
|
-
op: string;
|
|
133
|
-
}): TransactionType | undefined;
|
|
134
|
-
/**
|
|
135
|
-
* Enables or disables native frames tracking based on the `enableNativeFramesTracking` option.
|
|
136
|
-
*/
|
|
137
|
-
private _enableNativeFramesTracking;
|
|
138
|
-
/**
|
|
139
|
-
* Sets the current view name into the app context.
|
|
140
|
-
* @param event Le event.
|
|
141
|
-
*/
|
|
142
|
-
private _getCurrentViewEventProcessor;
|
|
143
|
-
/**
|
|
144
|
-
* Returns the App Start Duration in Milliseconds. Also returns undefined if not able do
|
|
145
|
-
* define the duration.
|
|
146
|
-
*/
|
|
147
|
-
private _getAppStartDurationMilliseconds;
|
|
148
|
-
/**
|
|
149
|
-
* Instruments the app start measurements on the first route transaction.
|
|
150
|
-
* Starts a route transaction if there isn't routing instrumentation.
|
|
151
|
-
*/
|
|
152
|
-
private _instrumentAppStart;
|
|
153
|
-
/**
|
|
154
|
-
* Adds app start measurements and starts a child span on a transaction.
|
|
155
|
-
*/
|
|
156
|
-
private _addAppStartData;
|
|
157
|
-
/**
|
|
158
|
-
* Adds JS Execution before React Root. If `Sentry.wrap` is not used, create a span for the start of JS Bundle execution.
|
|
159
|
-
*/
|
|
160
|
-
private _addJSExecutionBeforeRoot;
|
|
161
|
-
/**
|
|
162
|
-
* Adds native spans to the app start span.
|
|
163
|
-
*/
|
|
164
|
-
private _addNativeSpansTo;
|
|
165
|
-
/**
|
|
166
|
-
* UIKit init is measured by the native layers till the native SDK start
|
|
167
|
-
* RN initializes the native SDK later, the end timestamp would be wrong
|
|
168
|
-
*/
|
|
169
|
-
private _createUIKitSpan;
|
|
170
|
-
/** To be called when the route changes, but BEFORE the components of the new route mount. */
|
|
171
|
-
private _onRouteWillChange;
|
|
172
|
-
/**
|
|
173
|
-
* Creates a breadcrumb and sets the current route as a tag.
|
|
174
|
-
*/
|
|
175
|
-
private _onConfirmRoute;
|
|
176
|
-
/** Create routing idle transaction. */
|
|
177
|
-
private _createRouteTransaction;
|
|
178
|
-
/**
|
|
179
|
-
* Start app state aware idle transaction on the scope.
|
|
180
|
-
*/
|
|
181
|
-
private _startIdleTransaction;
|
|
182
|
-
}
|
|
62
|
+
export declare function getCurrentReactNativeTracingIntegration(): ReactNativeTracingIntegration | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Returns React Native Tracing integration of given client.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getReactNativeTracingIntegration(client: Client): ReactNativeTracingIntegration | undefined;
|
|
183
67
|
//# sourceMappingURL=reactnativetracing.d.ts.map
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface NavigationRoute {
|
|
5
|
-
name: string;
|
|
6
|
-
key: string;
|
|
7
|
-
params?: Record<string, any>;
|
|
8
|
-
}
|
|
9
|
-
interface ReactNavigationOptions {
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
export declare const INTEGRATION_NAME = "ReactNavigation";
|
|
3
|
+
interface ReactNavigationIntegrationOptions {
|
|
10
4
|
/**
|
|
11
5
|
* How long the instrumentation will wait for the route to mount after a change has been initiated,
|
|
12
6
|
* before the transaction is discarded.
|
|
13
|
-
* Time is in ms.
|
|
14
7
|
*
|
|
15
|
-
* @default
|
|
8
|
+
* @default 1_000 (ms)
|
|
16
9
|
*/
|
|
17
10
|
routeChangeTimeoutMs: number;
|
|
18
11
|
/**
|
|
@@ -22,6 +15,13 @@ interface ReactNavigationOptions {
|
|
|
22
15
|
* @default false
|
|
23
16
|
*/
|
|
24
17
|
enableTimeToInitialDisplay: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Does not sample transactions that are from routes that have been seen any more and don't have any spans.
|
|
20
|
+
* This removes a lot of the clutter as most back navigation transactions are now ignored.
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
ignoreEmptyBackNavigationTransactions: boolean;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Instrumentation for React-Navigation V5 and above. See docs or sample app for usage.
|
|
@@ -31,62 +31,17 @@ interface ReactNavigationOptions {
|
|
|
31
31
|
* - `_onStateChange` is then called AFTER the state change happens due to a dispatch and sets the route context onto the active transaction.
|
|
32
32
|
* - If `_onStateChange` isn't called within `STATE_CHANGE_TIMEOUT_DURATION` of the dispatch, then the transaction is not sampled and finished.
|
|
33
33
|
*/
|
|
34
|
-
export declare
|
|
35
|
-
static instrumentationName: string;
|
|
36
|
-
readonly name: string;
|
|
37
|
-
private _navigationContainer;
|
|
38
|
-
private _newScreenFrameEventEmitter;
|
|
39
|
-
private readonly _maxRecentRouteLen;
|
|
40
|
-
private _latestRoute?;
|
|
41
|
-
private _latestTransaction?;
|
|
42
|
-
private _navigationProcessingSpan?;
|
|
43
|
-
private _initialStateHandled;
|
|
44
|
-
private _stateChangeTimeout?;
|
|
45
|
-
private _recentRouteKeys;
|
|
46
|
-
private _options;
|
|
47
|
-
constructor(options?: Partial<ReactNavigationOptions>);
|
|
48
|
-
/**
|
|
49
|
-
* Extends by calling _handleInitialState at the end.
|
|
50
|
-
*/
|
|
51
|
-
registerRoutingInstrumentation(listener: TransactionCreator, beforeNavigate: BeforeNavigate, onConfirmRoute: OnConfirmRoute): void;
|
|
34
|
+
export declare const reactNavigationIntegration: ({ routeChangeTimeoutMs, enableTimeToInitialDisplay, ignoreEmptyBackNavigationTransactions, }?: Partial<ReactNavigationIntegrationOptions>) => Integration & {
|
|
52
35
|
/**
|
|
53
36
|
* Pass the ref to the navigation container to register it to the instrumentation
|
|
54
37
|
* @param navigationContainerRef Ref to a `NavigationContainer`
|
|
55
38
|
*/
|
|
56
|
-
registerNavigationContainer(navigationContainerRef:
|
|
57
|
-
/**
|
|
58
|
-
* To be called on every React-Navigation action dispatch.
|
|
59
|
-
* It does not name the transaction or populate it with route information. Instead, it waits for the state to fully change
|
|
60
|
-
* and gets the route information from there, @see _onStateChange
|
|
61
|
-
*/
|
|
62
|
-
private _onDispatch;
|
|
63
|
-
/**
|
|
64
|
-
* To be called AFTER the state has been changed to populate the transaction with the current route.
|
|
65
|
-
*/
|
|
66
|
-
private _onStateChange;
|
|
67
|
-
/** Creates final transaction context before confirmation */
|
|
68
|
-
private _prepareFinalContext;
|
|
69
|
-
/** Pushes a recent route key, and removes earlier routes when there is greater than the max length */
|
|
70
|
-
private _pushRecentRouteKey;
|
|
71
|
-
/** Cancels the latest transaction so it does not get sent to Sentry. */
|
|
72
|
-
private _discardLatestTransaction;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
private _clearStateChangeTimeout;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Backwards compatibility alias for ReactNavigationInstrumentation
|
|
80
|
-
* @deprecated Use ReactNavigationInstrumentation
|
|
81
|
-
*/
|
|
82
|
-
export declare const ReactNavigationV5Instrumentation: typeof ReactNavigationInstrumentation;
|
|
83
|
-
export declare const BLANK_TRANSACTION_CONTEXT: {
|
|
84
|
-
name: string;
|
|
85
|
-
op: string;
|
|
86
|
-
tags: {
|
|
87
|
-
'routing.instrumentation': string;
|
|
88
|
-
};
|
|
89
|
-
data: {};
|
|
39
|
+
registerNavigationContainer: (navigationContainerRef: unknown) => void;
|
|
90
40
|
};
|
|
41
|
+
export interface NavigationRoute {
|
|
42
|
+
name: string;
|
|
43
|
+
key: string;
|
|
44
|
+
params?: Record<string, any>;
|
|
45
|
+
}
|
|
91
46
|
export {};
|
|
92
47
|
//# sourceMappingURL=reactnavigation.d.ts.map
|