@sentry/react-native 5.3.0 → 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.
Files changed (207) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +7 -8
  3. package/RNSentry.podspec +1 -1
  4. package/android/build.gradle +1 -1
  5. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +13 -0
  6. package/dist/js/NativeRNSentry.d.ts +1 -1
  7. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  8. package/dist/js/NativeRNSentry.js.map +1 -1
  9. package/dist/js/breadcrumb.d.ts.map +1 -1
  10. package/dist/js/breadcrumb.js +3 -3
  11. package/dist/js/breadcrumb.js.map +1 -1
  12. package/dist/js/client.d.ts.map +1 -1
  13. package/dist/js/client.js +8 -5
  14. package/dist/js/client.js.map +1 -1
  15. package/dist/js/index.d.ts +1 -2
  16. package/dist/js/index.d.ts.map +1 -1
  17. package/dist/js/index.js +1 -5
  18. package/dist/js/index.js.map +1 -1
  19. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  20. package/dist/js/integrations/debugsymbolicator.js +1 -3
  21. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  22. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  23. package/dist/js/integrations/devicecontext.js +2 -4
  24. package/dist/js/integrations/devicecontext.js.map +1 -1
  25. package/dist/js/integrations/eventorigin.js +1 -1
  26. package/dist/js/integrations/eventorigin.js.map +1 -1
  27. package/dist/js/integrations/factory.d.ts.map +1 -1
  28. package/dist/js/integrations/factory.js +3 -1
  29. package/dist/js/integrations/factory.js.map +1 -1
  30. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  31. package/dist/js/integrations/modulesloader.js.map +1 -1
  32. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  33. package/dist/js/integrations/reactnativeerrorhandlers.js +2 -2
  34. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  35. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  36. package/dist/js/integrations/reactnativeinfo.js +1 -2
  37. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  38. package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
  39. package/dist/js/integrations/rewriteframes.js +2 -5
  40. package/dist/js/integrations/rewriteframes.js.map +1 -1
  41. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  42. package/dist/js/integrations/screenshot.js +2 -6
  43. package/dist/js/integrations/screenshot.js.map +1 -1
  44. package/dist/js/integrations/sdkinfo.js.map +1 -1
  45. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  46. package/dist/js/measurements.d.ts +2 -3
  47. package/dist/js/measurements.d.ts.map +1 -1
  48. package/dist/js/measurements.js +5 -8
  49. package/dist/js/measurements.js.map +1 -1
  50. package/dist/js/misc.d.ts.map +1 -1
  51. package/dist/js/misc.js +1 -3
  52. package/dist/js/misc.js.map +1 -1
  53. package/dist/js/options.d.ts +6 -6
  54. package/dist/js/options.d.ts.map +1 -1
  55. package/dist/js/options.js +1 -0
  56. package/dist/js/options.js.map +1 -1
  57. package/dist/js/scope.d.ts +2 -2
  58. package/dist/js/scope.d.ts.map +1 -1
  59. package/dist/js/scope.js +10 -7
  60. package/dist/js/scope.js.map +1 -1
  61. package/dist/js/sdk.d.ts +1 -1
  62. package/dist/js/sdk.d.ts.map +1 -1
  63. package/dist/js/sdk.js.map +1 -1
  64. package/dist/js/tools/ModulesCollector.d.ts.map +1 -1
  65. package/dist/js/tools/ModulesCollector.js +3 -7
  66. package/dist/js/tools/ModulesCollector.js.map +1 -1
  67. package/dist/js/tools/collectModules.js +1 -3
  68. package/dist/js/tools/collectModules.js.map +1 -1
  69. package/dist/js/touchevents.d.ts +1 -1
  70. package/dist/js/touchevents.d.ts.map +1 -1
  71. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  72. package/dist/js/tracing/gesturetracing.js +4 -2
  73. package/dist/js/tracing/gesturetracing.js.map +1 -1
  74. package/dist/js/tracing/index.d.ts +3 -3
  75. package/dist/js/tracing/index.d.ts.map +1 -1
  76. package/dist/js/tracing/index.js +2 -2
  77. package/dist/js/tracing/index.js.map +1 -1
  78. package/dist/js/tracing/nativeframes.d.ts +4 -4
  79. package/dist/js/tracing/nativeframes.d.ts.map +1 -1
  80. package/dist/js/tracing/nativeframes.js +15 -15
  81. package/dist/js/tracing/nativeframes.js.map +1 -1
  82. package/dist/js/tracing/ops.d.ts.map +1 -1
  83. package/dist/js/tracing/ops.js.map +1 -1
  84. package/dist/js/tracing/reactnativenavigation.d.ts +1 -1
  85. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  86. package/dist/js/tracing/reactnativenavigation.js +4 -11
  87. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  88. package/dist/js/tracing/reactnativetracing.d.ts +2 -2
  89. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  90. package/dist/js/tracing/reactnativetracing.js +19 -16
  91. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  92. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  93. package/dist/js/tracing/reactnavigation.js.map +1 -1
  94. package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
  95. package/dist/js/tracing/reactnavigationv4.js +1 -2
  96. package/dist/js/tracing/reactnavigationv4.js.map +1 -1
  97. package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
  98. package/dist/js/tracing/routingInstrumentation.js.map +1 -1
  99. package/dist/js/tracing/stalltracking.d.ts +1 -1
  100. package/dist/js/tracing/stalltracking.d.ts.map +1 -1
  101. package/dist/js/tracing/stalltracking.js +9 -17
  102. package/dist/js/tracing/stalltracking.js.map +1 -1
  103. package/dist/js/tracing/transaction.d.ts.map +1 -1
  104. package/dist/js/tracing/transaction.js +2 -1
  105. package/dist/js/tracing/transaction.js.map +1 -1
  106. package/dist/js/tracing/types.d.ts.map +1 -1
  107. package/dist/js/tracing/types.js +1 -0
  108. package/dist/js/tracing/types.js.map +1 -1
  109. package/dist/js/tracing/utils.d.ts +1 -1
  110. package/dist/js/tracing/utils.d.ts.map +1 -1
  111. package/dist/js/tracing/utils.js.map +1 -1
  112. package/dist/js/transports/TextEncoder.d.ts.map +1 -1
  113. package/dist/js/transports/TextEncoder.js.map +1 -1
  114. package/dist/js/transports/native.d.ts +1 -1
  115. package/dist/js/transports/native.d.ts.map +1 -1
  116. package/dist/js/transports/native.js +1 -1
  117. package/dist/js/transports/native.js.map +1 -1
  118. package/dist/js/user.d.ts.map +1 -1
  119. package/dist/js/user.js +1 -0
  120. package/dist/js/user.js.map +1 -1
  121. package/dist/js/utils/envelope.d.ts.map +1 -1
  122. package/dist/js/utils/envelope.js +5 -2
  123. package/dist/js/utils/envelope.js.map +1 -1
  124. package/dist/js/utils/normalize.d.ts +5 -0
  125. package/dist/js/utils/normalize.d.ts.map +1 -0
  126. package/dist/js/utils/normalize.js +17 -0
  127. package/dist/js/utils/normalize.js.map +1 -0
  128. package/dist/js/utils/outcome.js +1 -1
  129. package/dist/js/utils/outcome.js.map +1 -1
  130. package/dist/js/utils/safe.d.ts.map +1 -1
  131. package/dist/js/utils/safe.js +1 -3
  132. package/dist/js/utils/safe.js.map +1 -1
  133. package/dist/js/vendor/buffer/index.d.ts +1 -1
  134. package/dist/js/vendor/buffer/index.d.ts.map +1 -1
  135. package/dist/js/vendor/buffer/index.js +1 -1
  136. package/dist/js/vendor/buffer/index.js.map +1 -1
  137. package/dist/js/vendor/buffer/utf8ToBytes.d.ts +0 -5
  138. package/dist/js/vendor/buffer/utf8ToBytes.d.ts.map +1 -1
  139. package/dist/js/vendor/buffer/utf8ToBytes.js +29 -16
  140. package/dist/js/vendor/buffer/utf8ToBytes.js.map +1 -1
  141. package/dist/js/vendor/index.d.ts +1 -1
  142. package/dist/js/vendor/index.d.ts.map +1 -1
  143. package/dist/js/vendor/index.js +1 -1
  144. package/dist/js/vendor/index.js.map +1 -1
  145. package/dist/js/version.d.ts +1 -1
  146. package/dist/js/version.js +1 -1
  147. package/dist/js/version.js.map +1 -1
  148. package/dist/js/wrapper.d.ts.map +1 -1
  149. package/dist/js/wrapper.js +15 -20
  150. package/dist/js/wrapper.js.map +1 -1
  151. package/ios/RNSentry.mm +31 -3
  152. package/ios/RNSentry.xcodeproj/project.pbxproj +472 -0
  153. package/package.json +29 -16
  154. package/sentry.gradle +16 -8
  155. package/src/js/NativeRNSentry.ts +5 -8
  156. package/ts3.8/dist/js/NativeRNSentry.d.ts +80 -0
  157. package/ts3.8/dist/js/breadcrumb.d.ts +11 -0
  158. package/ts3.8/dist/js/client.d.ts +59 -0
  159. package/ts3.8/dist/js/index.d.ts +13 -0
  160. package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +49 -0
  161. package/ts3.8/dist/js/integrations/devicecontext.d.ts +17 -0
  162. package/ts3.8/dist/js/integrations/eventorigin.d.ts +17 -0
  163. package/ts3.8/dist/js/integrations/factory.d.ts +7 -0
  164. package/ts3.8/dist/js/integrations/index.d.ts +9 -0
  165. package/ts3.8/dist/js/integrations/modulesloader.d.ts +17 -0
  166. package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +54 -0
  167. package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +23 -0
  168. package/ts3.8/dist/js/integrations/release.d.ts +17 -0
  169. package/ts3.8/dist/js/integrations/rewriteframes.d.ts +8 -0
  170. package/ts3.8/dist/js/integrations/screenshot.d.ts +23 -0
  171. package/ts3.8/dist/js/integrations/sdkinfo.d.ts +21 -0
  172. package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +20 -0
  173. package/ts3.8/dist/js/measurements.d.ts +13 -0
  174. package/ts3.8/dist/js/misc.d.ts +9 -0
  175. package/ts3.8/dist/js/options.d.ts +152 -0
  176. package/ts3.8/dist/js/scope.d.ts +54 -0
  177. package/ts3.8/dist/js/sdk.d.ts +63 -0
  178. package/ts3.8/dist/js/touchevents.d.ts +71 -0
  179. package/ts3.8/dist/js/tracing/gesturetracing.d.ts +20 -0
  180. package/ts3.8/dist/js/tracing/index.d.ts +10 -0
  181. package/ts3.8/dist/js/tracing/nativeframes.d.ts +64 -0
  182. package/ts3.8/dist/js/tracing/ops.d.ts +8 -0
  183. package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +85 -0
  184. package/ts3.8/dist/js/tracing/reactnativeprofiler.d.ts +12 -0
  185. package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +142 -0
  186. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +83 -0
  187. package/ts3.8/dist/js/tracing/reactnavigationv4.d.ts +92 -0
  188. package/ts3.8/dist/js/tracing/routingInstrumentation.d.ts +52 -0
  189. package/ts3.8/dist/js/tracing/stalltracking.d.ts +94 -0
  190. package/ts3.8/dist/js/tracing/transaction.d.ts +7 -0
  191. package/ts3.8/dist/js/tracing/types.d.ts +29 -0
  192. package/ts3.8/dist/js/tracing/utils.d.ts +27 -0
  193. package/ts3.8/dist/js/transports/TextEncoder.d.ts +3 -0
  194. package/ts3.8/dist/js/transports/native.d.ts +39 -0
  195. package/ts3.8/dist/js/user.d.ts +6 -0
  196. package/ts3.8/dist/js/utils/envelope.d.ts +12 -0
  197. package/ts3.8/dist/js/utils/environment.d.ts +7 -0
  198. package/ts3.8/dist/js/utils/ignorerequirecyclelogs.d.ts +5 -0
  199. package/ts3.8/dist/js/utils/normalize.d.ts +5 -0
  200. package/ts3.8/dist/js/utils/outcome.d.ts +6 -0
  201. package/ts3.8/dist/js/utils/safe.d.ts +21 -0
  202. package/ts3.8/dist/js/utils/worldwide.d.ts +15 -0
  203. package/ts3.8/dist/js/vendor/buffer/index.d.ts +2 -0
  204. package/ts3.8/dist/js/vendor/buffer/utf8ToBytes.d.ts +5 -0
  205. package/ts3.8/dist/js/vendor/index.d.ts +2 -0
  206. package/ts3.8/dist/js/version.d.ts +4 -0
  207. package/ts3.8/dist/js/wrapper.d.ts +55 -0
@@ -0,0 +1,80 @@
1
+ import type { Package } from '@sentry/types';
2
+ import type { TurboModule } from 'react-native';
3
+ import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
4
+ export interface Spec extends TurboModule {
5
+ addBreadcrumb(breadcrumb: UnsafeObject): void;
6
+ captureEnvelope(bytes: number[], options: {
7
+ store: boolean;
8
+ }): Promise<boolean>;
9
+ captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;
10
+ clearBreadcrumbs(): void;
11
+ crash(): void;
12
+ closeNativeSdk(): Promise<void>;
13
+ disableNativeFramesTracking(): void;
14
+ fetchNativeRelease(): Promise<NativeReleaseResponse>;
15
+ fetchNativeSdkInfo(): Promise<Package>;
16
+ fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse>;
17
+ fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;
18
+ fetchNativeFrames(): Promise<NativeFramesResponse | null>;
19
+ initNativeSdk(options: UnsafeObject): Promise<boolean>;
20
+ setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): void;
21
+ setContext(key: string, value: UnsafeObject | null): void;
22
+ setExtra(key: string, value: string): void;
23
+ setTag(key: string, value: string): void;
24
+ enableNativeFramesTracking(): void;
25
+ fetchModules(): Promise<string | undefined | null>;
26
+ fetchViewHierarchy(): Promise<number[] | undefined | null>;
27
+ }
28
+ export declare type NativeAppStartResponse = {
29
+ isColdStart: boolean;
30
+ appStartTime: number;
31
+ didFetchAppStart: boolean;
32
+ };
33
+ export declare type NativeFramesResponse = {
34
+ totalFrames: number;
35
+ slowFrames: number;
36
+ frozenFrames: number;
37
+ };
38
+ export declare type NativeReleaseResponse = {
39
+ build: string;
40
+ id: string;
41
+ version: string;
42
+ };
43
+ /**
44
+ * This type describes serialized scope from sentry-cocoa. (This is not used for Android)
45
+ * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m
46
+ */
47
+ export declare type NativeDeviceContextsResponse = {
48
+ [key: string]: unknown;
49
+ tags?: Record<string, string>;
50
+ extra?: Record<string, unknown>;
51
+ context?: Record<string, Record<string, unknown>>;
52
+ user?: {
53
+ userId?: string;
54
+ email?: string;
55
+ username?: string;
56
+ ipAddress?: string;
57
+ segment?: string;
58
+ data?: Record<string, unknown>;
59
+ };
60
+ dist?: string;
61
+ environment?: string;
62
+ fingerprint?: string[];
63
+ level?: string;
64
+ breadcrumbs?: {
65
+ level?: string;
66
+ timestamp?: string;
67
+ category?: string;
68
+ type?: string;
69
+ message?: string;
70
+ data?: Record<string, unknown>;
71
+ }[];
72
+ };
73
+ export declare type NativeScreenshot = {
74
+ data: number[];
75
+ contentType: string;
76
+ filename: string;
77
+ };
78
+ declare const _default: Spec;
79
+ export default _default;
80
+ //# sourceMappingURL=NativeRNSentry.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { Breadcrumb, SeverityLevel } from '@sentry/types';
2
+ export declare const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel;
3
+ declare type BreadcrumbCandidate = {
4
+ [K in keyof Partial<Breadcrumb>]: unknown;
5
+ };
6
+ /**
7
+ * Convert plain object to a valid Breadcrumb
8
+ */
9
+ export declare function breadcrumbFromObject(candidate: BreadcrumbCandidate): Breadcrumb;
10
+ export {};
11
+ //# sourceMappingURL=breadcrumb.d.ts.map
@@ -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