@sentry/react-native 5.3.1 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +7 -8
- package/RNSentry.podspec +1 -1
- package/dist/js/NativeRNSentry.d.ts +1 -1
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/breadcrumb.js +3 -3
- package/dist/js/breadcrumb.js.map +1 -1
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +4 -0
- package/dist/js/client.js.map +1 -1
- package/dist/js/options.js +1 -0
- package/dist/js/scope.d.ts.map +1 -1
- package/dist/js/scope.js +6 -3
- package/dist/js/scope.js.map +1 -1
- package/dist/js/sdk.d.ts +1 -1
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/touchevents.d.ts +1 -1
- package/dist/js/touchevents.d.ts.map +1 -1
- package/dist/js/tracing/reactnativenavigation.d.ts +1 -1
- package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnativenavigation.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +1 -2
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/types.js +1 -0
- package/dist/js/tracing/utils.d.ts.map +1 -1
- package/dist/js/transports/TextEncoder.d.ts.map +1 -1
- package/dist/js/user.js +1 -0
- package/dist/js/utils/normalize.d.ts +5 -0
- package/dist/js/utils/normalize.d.ts.map +1 -0
- package/dist/js/utils/normalize.js +17 -0
- package/dist/js/utils/normalize.js.map +1 -0
- package/dist/js/version.d.ts +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 +9 -4
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +25 -0
- package/ios/RNSentry.xcodeproj/project.pbxproj +472 -0
- package/package.json +23 -15
- package/sentry.gradle +4 -1
- package/src/js/NativeRNSentry.ts +1 -1
- package/ts3.8/dist/js/NativeRNSentry.d.ts +80 -0
- package/ts3.8/dist/js/breadcrumb.d.ts +11 -0
- package/ts3.8/dist/js/client.d.ts +59 -0
- package/ts3.8/dist/js/index.d.ts +13 -0
- package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +49 -0
- package/ts3.8/dist/js/integrations/devicecontext.d.ts +17 -0
- package/ts3.8/dist/js/integrations/eventorigin.d.ts +17 -0
- package/ts3.8/dist/js/integrations/factory.d.ts +7 -0
- package/ts3.8/dist/js/integrations/index.d.ts +9 -0
- package/ts3.8/dist/js/integrations/modulesloader.d.ts +17 -0
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +54 -0
- package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +23 -0
- package/ts3.8/dist/js/integrations/release.d.ts +17 -0
- package/ts3.8/dist/js/integrations/rewriteframes.d.ts +8 -0
- package/ts3.8/dist/js/integrations/screenshot.d.ts +23 -0
- package/ts3.8/dist/js/integrations/sdkinfo.d.ts +21 -0
- package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +20 -0
- package/ts3.8/dist/js/measurements.d.ts +13 -0
- package/ts3.8/dist/js/misc.d.ts +9 -0
- package/ts3.8/dist/js/options.d.ts +152 -0
- package/ts3.8/dist/js/scope.d.ts +54 -0
- package/ts3.8/dist/js/sdk.d.ts +63 -0
- package/ts3.8/dist/js/touchevents.d.ts +71 -0
- package/ts3.8/dist/js/tracing/gesturetracing.d.ts +20 -0
- package/ts3.8/dist/js/tracing/index.d.ts +10 -0
- package/ts3.8/dist/js/tracing/nativeframes.d.ts +64 -0
- package/ts3.8/dist/js/tracing/ops.d.ts +8 -0
- package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +85 -0
- package/ts3.8/dist/js/tracing/reactnativeprofiler.d.ts +12 -0
- package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +142 -0
- package/ts3.8/dist/js/tracing/reactnavigation.d.ts +83 -0
- package/ts3.8/dist/js/tracing/reactnavigationv4.d.ts +92 -0
- package/ts3.8/dist/js/tracing/routingInstrumentation.d.ts +52 -0
- package/ts3.8/dist/js/tracing/stalltracking.d.ts +94 -0
- package/ts3.8/dist/js/tracing/transaction.d.ts +7 -0
- package/ts3.8/dist/js/tracing/types.d.ts +29 -0
- package/ts3.8/dist/js/tracing/utils.d.ts +27 -0
- package/ts3.8/dist/js/transports/TextEncoder.d.ts +3 -0
- package/ts3.8/dist/js/transports/native.d.ts +39 -0
- package/ts3.8/dist/js/user.d.ts +6 -0
- package/ts3.8/dist/js/utils/envelope.d.ts +12 -0
- package/ts3.8/dist/js/utils/environment.d.ts +7 -0
- package/ts3.8/dist/js/utils/ignorerequirecyclelogs.d.ts +5 -0
- package/ts3.8/dist/js/utils/normalize.d.ts +5 -0
- package/ts3.8/dist/js/utils/outcome.d.ts +6 -0
- package/ts3.8/dist/js/utils/safe.d.ts +21 -0
- package/ts3.8/dist/js/utils/worldwide.d.ts +15 -0
- package/ts3.8/dist/js/vendor/buffer/index.d.ts +2 -0
- package/ts3.8/dist/js/vendor/buffer/utf8ToBytes.d.ts +5 -0
- package/ts3.8/dist/js/vendor/index.d.ts +2 -0
- package/ts3.8/dist/js/version.d.ts +4 -0
- package/ts3.8/dist/js/wrapper.d.ts +55 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { BaseClient } from '@sentry/core';
|
|
2
|
+
import type { Envelope, Event, EventHint, SeverityLevel, UserFeedback } from '@sentry/types';
|
|
3
|
+
import type { ReactNativeClientOptions } from './options';
|
|
4
|
+
/**
|
|
5
|
+
* The Sentry React Native SDK Client.
|
|
6
|
+
*
|
|
7
|
+
* @see ReactNativeClientOptions for documentation on configuration options.
|
|
8
|
+
* @see SentryClient for usage documentation.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {
|
|
11
|
+
private _outcomesBuffer;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new React Native SDK instance.
|
|
14
|
+
* @param options Configuration options for this SDK.
|
|
15
|
+
*/
|
|
16
|
+
constructor(options: ReactNativeClientOptions);
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
|
|
25
|
+
/**
|
|
26
|
+
* If native client is available it will trigger a native crash.
|
|
27
|
+
* Use this only for testing purposes.
|
|
28
|
+
*/
|
|
29
|
+
nativeCrash(): void;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
close(): PromiseLike<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Sends user feedback to Sentry.
|
|
36
|
+
*/
|
|
37
|
+
captureUserFeedback(feedback: UserFeedback): void;
|
|
38
|
+
/**
|
|
39
|
+
* Sets up the integrations
|
|
40
|
+
*/
|
|
41
|
+
setupIntegrations(): void;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritdoc
|
|
44
|
+
*/
|
|
45
|
+
protected _sendEnvelope(envelope: Envelope): void;
|
|
46
|
+
/**
|
|
47
|
+
* Starts native client with dsn and options
|
|
48
|
+
*/
|
|
49
|
+
private _initNativeSdk;
|
|
50
|
+
/**
|
|
51
|
+
* If the user is in development mode, and the native nagger is enabled then it will show an alert.
|
|
52
|
+
*/
|
|
53
|
+
private _showCannotConnectDialog;
|
|
54
|
+
/**
|
|
55
|
+
* Attaches a client report from outcomes to the envelope.
|
|
56
|
+
*/
|
|
57
|
+
private _attachClientReportTo;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Breadcrumb, Request, SdkInfo, Event, Exception, StackFrame, Stacktrace, Thread, User, UserFeedback, } from '@sentry/types';
|
|
2
|
+
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, } from '@sentry/core';
|
|
3
|
+
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
4
|
+
export { lastEventId } from '@sentry/browser';
|
|
5
|
+
import * as Integrations from './integrations';
|
|
6
|
+
import { SDK_NAME, SDK_VERSION } from './version';
|
|
7
|
+
export { ReactNativeOptions } from './options';
|
|
8
|
+
export { ReactNativeClient } from './client';
|
|
9
|
+
export { init, wrap, setDist, setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configureScope, } from './sdk';
|
|
10
|
+
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
11
|
+
export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, ReactNavigationTransactionContext, sentryTraceGesture, } from './tracing';
|
|
12
|
+
export { Integrations, SDK_NAME, SDK_VERSION };
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* React Native Error
|
|
4
|
+
*/
|
|
5
|
+
export declare type ReactNativeError = Error & {
|
|
6
|
+
framesToPop?: number;
|
|
7
|
+
jsEngine?: string;
|
|
8
|
+
preventSymbolication?: boolean;
|
|
9
|
+
componentStack?: string;
|
|
10
|
+
};
|
|
11
|
+
/** Tries to symbolicate the JS stack trace on the device. */
|
|
12
|
+
export declare class DebugSymbolicator implements Integration {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
static id: string;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
setupOnce(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Symbolicates the stack on the device talking to local dev server.
|
|
27
|
+
* Mutates the passed event.
|
|
28
|
+
*/
|
|
29
|
+
private _symbolicate;
|
|
30
|
+
/**
|
|
31
|
+
* Converts ReactNativeFrames to frames in the Sentry format
|
|
32
|
+
* @param frames ReactNativeFrame[]
|
|
33
|
+
*/
|
|
34
|
+
private _convertReactNativeFramesToSentryFrames;
|
|
35
|
+
/**
|
|
36
|
+
* Replaces the frames in the exception of a error.
|
|
37
|
+
* @param event Event
|
|
38
|
+
* @param frames StackFrame[]
|
|
39
|
+
*/
|
|
40
|
+
private _replaceFramesInEvent;
|
|
41
|
+
/**
|
|
42
|
+
* This tries to add source context for in_app Frames
|
|
43
|
+
*
|
|
44
|
+
* @param frame StackFrame
|
|
45
|
+
* @param getDevServer function from RN to get DevServer URL
|
|
46
|
+
*/
|
|
47
|
+
private _addSourceContext;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=debugsymbolicator.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EventProcessor, Hub, Integration } from '@sentry/types';
|
|
2
|
+
/** Load device context from native. */
|
|
3
|
+
export declare class DeviceContext implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=devicecontext.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EventProcessor, Integration } from '@sentry/types';
|
|
2
|
+
/** Default EventOrigin instrumentation */
|
|
3
|
+
export declare class EventOrigin implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=eventorigin.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates an integration out of the provided name and setup function.
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export declare function createIntegration(name: Integration['name'], setupOnce?: Integration['setupOnce']): Integration;
|
|
7
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { DebugSymbolicator } from './debugsymbolicator';
|
|
2
|
+
export { DeviceContext } from './devicecontext';
|
|
3
|
+
export { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';
|
|
4
|
+
export { Release } from './release';
|
|
5
|
+
export { EventOrigin } from './eventorigin';
|
|
6
|
+
export { SdkInfo } from './sdkinfo';
|
|
7
|
+
export { ReactNativeInfo } from './reactnativeinfo';
|
|
8
|
+
export { ModulesLoader } from './modulesloader';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EventProcessor, Integration } from '@sentry/types';
|
|
2
|
+
/** Loads runtime JS modules from prepared file. */
|
|
3
|
+
export declare class ModulesLoader implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=modulesloader.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
/** ReactNativeErrorHandlers Options */
|
|
3
|
+
interface ReactNativeErrorHandlersOptions {
|
|
4
|
+
onerror: boolean;
|
|
5
|
+
onunhandledrejection: boolean;
|
|
6
|
+
patchGlobalPromise: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** ReactNativeErrorHandlers Integration */
|
|
9
|
+
export declare class ReactNativeErrorHandlers implements Integration {
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
static id: string;
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/** ReactNativeOptions */
|
|
19
|
+
private readonly _options;
|
|
20
|
+
/** Constructor */
|
|
21
|
+
constructor(options?: Partial<ReactNativeErrorHandlersOptions>);
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
setupOnce(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Handle Promises
|
|
28
|
+
*/
|
|
29
|
+
private _handleUnhandledRejections;
|
|
30
|
+
/**
|
|
31
|
+
* Polyfill the global promise instance with one we can be sure that we can attach the tracking to.
|
|
32
|
+
*
|
|
33
|
+
* In newer RN versions >=0.63, the global promise is not the same reference as the one imported from the promise library.
|
|
34
|
+
* This is due to a version mismatch between promise versions.
|
|
35
|
+
* Originally we tried a solution where we would have you put a package resolution to ensure the promise instances match. However,
|
|
36
|
+
* - Using a package resolution requires the you to manually troubleshoot.
|
|
37
|
+
* - The package resolution fix no longer works with 0.67 on iOS Hermes.
|
|
38
|
+
*/
|
|
39
|
+
private _polyfillPromise;
|
|
40
|
+
/**
|
|
41
|
+
* Attach the unhandled rejection handler
|
|
42
|
+
*/
|
|
43
|
+
private _attachUnhandledRejectionHandler;
|
|
44
|
+
/**
|
|
45
|
+
* Checks if the promise is the same one or not, if not it will warn the user
|
|
46
|
+
*/
|
|
47
|
+
private _checkPromiseAndWarn;
|
|
48
|
+
/**
|
|
49
|
+
* Handle errors
|
|
50
|
+
*/
|
|
51
|
+
private _handleOnError;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=reactnativeerrorhandlers.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Context, EventProcessor, Integration } from '@sentry/types';
|
|
2
|
+
export interface ReactNativeContext extends Context {
|
|
3
|
+
js_engine?: string;
|
|
4
|
+
turbo_module: boolean;
|
|
5
|
+
fabric: boolean;
|
|
6
|
+
component_stack?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Loads React Native context at runtime */
|
|
9
|
+
export declare class ReactNativeInfo implements Integration {
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
static id: string;
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=reactnativeinfo.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Integration } from '@sentry/types';
|
|
2
|
+
/** Release integration responsible to load release from file. */
|
|
3
|
+
export declare class Release implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
setupOnce(): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=release.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RewriteFrames } from '@sentry/integrations';
|
|
2
|
+
/**
|
|
3
|
+
* Creates React Native default rewrite frames integration
|
|
4
|
+
* which appends app:// to the beginning of the filename
|
|
5
|
+
* and removes file://, 'address at' prefixes and CodePush postfix.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createReactNativeRewriteFrames(): RewriteFrames;
|
|
8
|
+
//# sourceMappingURL=rewriteframes.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { EventHint, Integration } from '@sentry/types';
|
|
2
|
+
/** Adds screenshots to error events */
|
|
3
|
+
export declare class Screenshot implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* If enabled attaches a screenshot to the event hint.
|
|
14
|
+
*/
|
|
15
|
+
static attachScreenshotToEventHint(hint: EventHint, { attachScreenshot }: {
|
|
16
|
+
attachScreenshot?: boolean;
|
|
17
|
+
}): PromiseLike<EventHint>;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
setupOnce(): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=screenshot.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { EventProcessor, Integration, SdkInfo as SdkInfoType } from '@sentry/types';
|
|
2
|
+
declare type DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;
|
|
3
|
+
export declare const defaultSdkInfo: DefaultSdkInfo;
|
|
4
|
+
/** Default SdkInfo instrumentation */
|
|
5
|
+
export declare class SdkInfo implements Integration {
|
|
6
|
+
/**
|
|
7
|
+
* @inheritDoc
|
|
8
|
+
*/
|
|
9
|
+
static id: string;
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
private _nativeSdkInfo;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=sdkinfo.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EventProcessor, Integration } from '@sentry/types';
|
|
2
|
+
/** Adds ViewHierarchy to error events */
|
|
3
|
+
export declare class ViewHierarchy implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
private static _fileName;
|
|
9
|
+
private static _contentType;
|
|
10
|
+
private static _attachmentType;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=viewhierarchy.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Hub, Transaction } from '@sentry/core';
|
|
2
|
+
import type { CustomSamplingContext, TransactionContext } from '@sentry/types';
|
|
3
|
+
export declare const APP_START_WARM = "app_start_warm";
|
|
4
|
+
export declare const APP_START_COLD = "app_start_cold";
|
|
5
|
+
export declare const STALL_COUNT = "stall_count";
|
|
6
|
+
export declare const STALL_TOTAL_TIME = "stall_total_time";
|
|
7
|
+
export declare const STALL_LONGEST_TIME = "stall_longest_time";
|
|
8
|
+
/**
|
|
9
|
+
* Adds React Native's extensions. Needs to be called before any transactions are created.
|
|
10
|
+
*/
|
|
11
|
+
export declare function _addTracingExtensions(): void;
|
|
12
|
+
export declare type StartTransactionFunction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
|
|
13
|
+
//# sourceMappingURL=measurements.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EnvelopeItem } from '@sentry/types';
|
|
2
|
+
declare type EnvelopeItemPayload = EnvelopeItem[1];
|
|
3
|
+
/**
|
|
4
|
+
* Extracts the hard crash information from the event exceptions.
|
|
5
|
+
* No exceptions or undefined handled are not hard crashes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isHardCrash(payload: EnvelopeItemPayload): boolean;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=misc.d.ts.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
|
|
2
|
+
import type { ProfilerProps } from '@sentry/react/types/profiler';
|
|
3
|
+
import type { ClientOptions, Options } from '@sentry/types';
|
|
4
|
+
import type { CaptureContext } from '@sentry/types/types/scope';
|
|
5
|
+
import type { TouchEventBoundaryProps } from './touchevents';
|
|
6
|
+
export interface BaseReactNativeOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Enables native transport + device info + offline caching.
|
|
9
|
+
* Be careful, disabling this also breaks automatic release setting.
|
|
10
|
+
* This means you have to manage setting the release yourself.
|
|
11
|
+
* Defaults to `true`.
|
|
12
|
+
*/
|
|
13
|
+
enableNative?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Enables native crashHandling. This only works if `enableNative` is `true`.
|
|
16
|
+
* Defaults to `true`.
|
|
17
|
+
*/
|
|
18
|
+
enableNativeCrashHandling?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Initializes the native SDK on init.
|
|
21
|
+
* Set this to `false` if you have an existing native SDK and don't want to re-initialize.
|
|
22
|
+
*
|
|
23
|
+
* NOTE: Be careful and only use this if you know what you are doing.
|
|
24
|
+
* If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.
|
|
25
|
+
* Also, make sure the DSN on both the React Native side and the native side are the same one.
|
|
26
|
+
* We strongly recommend checking the documentation if you need to use this.
|
|
27
|
+
*
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
autoInitializeNativeSdk?: boolean;
|
|
31
|
+
/** Should the native nagger alert be shown or not. */
|
|
32
|
+
enableNativeNagger?: boolean;
|
|
33
|
+
/** Should sessions be tracked to Sentry Health or not. */
|
|
34
|
+
enableAutoSessionTracking?: boolean;
|
|
35
|
+
/** The interval to end a session if the App goes to the background. */
|
|
36
|
+
sessionTrackingIntervalMillis?: number;
|
|
37
|
+
/** Enable scope sync from Java to NDK on Android */
|
|
38
|
+
enableNdkScopeSync?: boolean;
|
|
39
|
+
/** When enabled, all the threads are automatically attached to all logged events on Android */
|
|
40
|
+
attachThreads?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* When enabled, certain personally identifiable information (PII) is added by active integrations.
|
|
43
|
+
*
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
sendDefaultPii?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.
|
|
49
|
+
*/
|
|
50
|
+
onReady?: (response: {
|
|
51
|
+
/** `true` if the native SDK has been initialized, `false` otherwise. */
|
|
52
|
+
didCallNativeInit: boolean;
|
|
53
|
+
}) => void;
|
|
54
|
+
/** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */
|
|
55
|
+
enableAutoPerformanceTracing?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Enables Out of Memory Tracking for iOS and macCatalyst.
|
|
58
|
+
* See the following link for more information and possible restrictions:
|
|
59
|
+
* https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/
|
|
60
|
+
*
|
|
61
|
+
* Renamed from `enableOutOfMemoryTracking` in v5.
|
|
62
|
+
*
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
enableWatchdogTerminationTracking?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Set data to the inital scope
|
|
68
|
+
* @deprecated Use `Sentry.configureScope(...)`
|
|
69
|
+
*/
|
|
70
|
+
initialScope?: CaptureContext;
|
|
71
|
+
/**
|
|
72
|
+
* When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.
|
|
73
|
+
* If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.
|
|
74
|
+
* Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections
|
|
75
|
+
*
|
|
76
|
+
* When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.
|
|
77
|
+
*
|
|
78
|
+
* @default true
|
|
79
|
+
*/
|
|
80
|
+
patchGlobalPromise?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The max cache items for capping the number of envelopes.
|
|
83
|
+
*
|
|
84
|
+
* @default 30
|
|
85
|
+
*/
|
|
86
|
+
maxCacheItems?: number;
|
|
87
|
+
/**
|
|
88
|
+
* When enabled, the SDK tracks when the application stops responding for a specific amount of
|
|
89
|
+
* time defined by the `appHangTimeoutInterval` option.
|
|
90
|
+
*
|
|
91
|
+
* iOS only
|
|
92
|
+
*
|
|
93
|
+
* @default true
|
|
94
|
+
*/
|
|
95
|
+
enableAppHangTracking?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* The minimum amount of time an app should be unresponsive to be classified as an App Hanging.
|
|
98
|
+
* The actual amount may be a little longer.
|
|
99
|
+
* Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.
|
|
100
|
+
* Value should be in seconds.
|
|
101
|
+
*
|
|
102
|
+
* iOS only
|
|
103
|
+
*
|
|
104
|
+
* @default 2
|
|
105
|
+
*/
|
|
106
|
+
appHangTimeoutInterval?: number;
|
|
107
|
+
/**
|
|
108
|
+
* The max queue size for capping the number of envelopes waiting to be sent by Transport.
|
|
109
|
+
*/
|
|
110
|
+
maxQueueSize?: number;
|
|
111
|
+
/**
|
|
112
|
+
* When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.
|
|
113
|
+
*
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
attachScreenshot?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* When enabled Sentry includes the current view hierarchy in the error attachments.
|
|
119
|
+
*
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
attachViewHierarchy?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.
|
|
125
|
+
* [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)
|
|
126
|
+
* is needed to capture HTTP Errors on Android.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
enableCaptureFailedRequests?: boolean;
|
|
131
|
+
}
|
|
132
|
+
export interface ReactNativeTransportOptions extends BrowserTransportOptions {
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated use `maxQueueSize` in the root of the SDK options.
|
|
135
|
+
*/
|
|
136
|
+
bufferSize?: number;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Configuration options for the Sentry ReactNative SDK.
|
|
140
|
+
* @see ReactNativeFrontend for more information.
|
|
141
|
+
*/
|
|
142
|
+
export interface ReactNativeOptions extends Options<ReactNativeTransportOptions>, BaseReactNativeOptions {
|
|
143
|
+
}
|
|
144
|
+
export interface ReactNativeClientOptions extends ClientOptions<ReactNativeTransportOptions>, BaseReactNativeOptions {
|
|
145
|
+
}
|
|
146
|
+
export interface ReactNativeWrapperOptions {
|
|
147
|
+
/** Props for the root React profiler */
|
|
148
|
+
profilerProps?: ProfilerProps;
|
|
149
|
+
/** Props for the root touch event boundary */
|
|
150
|
+
touchEventBoundaryProps?: TouchEventBoundaryProps;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Scope } from '@sentry/core';
|
|
2
|
+
import type { Attachment, Breadcrumb, User } from '@sentry/types';
|
|
3
|
+
/**
|
|
4
|
+
* Extends the scope methods to set scope on the Native SDKs
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReactNativeScope extends Scope {
|
|
7
|
+
/**
|
|
8
|
+
* @inheritDoc
|
|
9
|
+
*/
|
|
10
|
+
setUser(user: User | null): this;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
setTag(key: string, value: string): this;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
setTags(tags: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
}): this;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
setExtras(extras: {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}): this;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
setExtra(key: string, extra: any): this;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
clearBreadcrumbs(): this;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
setContext(key: string, context: {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
} | null): this;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
addAttachment(attachment: Attachment): this;
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc
|
|
51
|
+
*/
|
|
52
|
+
clearAttachments(): this;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Scope } from '@sentry/core';
|
|
2
|
+
import { Hub } from '@sentry/core';
|
|
3
|
+
import type { UserFeedback } from '@sentry/types';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import type { ReactNativeOptions, ReactNativeWrapperOptions } from './options';
|
|
6
|
+
/**
|
|
7
|
+
* Inits the SDK and returns the final options.
|
|
8
|
+
*/
|
|
9
|
+
export declare function init(passedOptions: ReactNativeOptions): void;
|
|
10
|
+
/**
|
|
11
|
+
* Inits the Sentry React Native SDK with automatic instrumentation and wrapped features.
|
|
12
|
+
*/
|
|
13
|
+
export declare function wrap<P extends JSX.IntrinsicAttributes>(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
|
+
/**
|
|
27
|
+
* If native client is available it will trigger a native crash.
|
|
28
|
+
* Use this only for testing purposes.
|
|
29
|
+
*/
|
|
30
|
+
export declare function nativeCrash(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Flushes all pending events in the queue to disk.
|
|
33
|
+
* Use this before applying any realtime updates such as code-push or expo updates.
|
|
34
|
+
*/
|
|
35
|
+
export declare function flush(): Promise<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* Closes the SDK, stops sending events.
|
|
38
|
+
*/
|
|
39
|
+
export declare function close(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Captures user feedback and sends it to Sentry.
|
|
42
|
+
*/
|
|
43
|
+
export declare function captureUserFeedback(feedback: UserFeedback): void;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new scope with and executes the given operation within.
|
|
46
|
+
* The scope is automatically removed once the operation
|
|
47
|
+
* finishes or throws.
|
|
48
|
+
*
|
|
49
|
+
* This is essentially a convenience function for:
|
|
50
|
+
*
|
|
51
|
+
* pushScope();
|
|
52
|
+
* callback();
|
|
53
|
+
* popScope();
|
|
54
|
+
*
|
|
55
|
+
* @param callback that will be enclosed into push/popScope.
|
|
56
|
+
*/
|
|
57
|
+
export declare function withScope(callback: (scope: Scope) => void): ReturnType<Hub['withScope']>;
|
|
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
|
+
//# sourceMappingURL=sdk.d.ts.map
|