@sentry/react-native 6.9.1 → 6.11.0-beta.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 (144) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +43 -21
  4. package/android/src/main/java/io/sentry/react/RNSentryOnDrawReporterManager.java +82 -51
  5. package/android/src/main/java/io/sentry/react/RNSentryTimeToDisplay.java +37 -0
  6. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  7. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
  8. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +5 -0
  9. package/dist/js/NativeRNSentry.d.ts +2 -0
  10. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  11. package/dist/js/NativeRNSentry.js.map +1 -1
  12. package/dist/js/feedback/FeedbackWidget.js +3 -3
  13. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  14. package/dist/js/index.d.ts +2 -1
  15. package/dist/js/index.d.ts.map +1 -1
  16. package/dist/js/index.js +2 -1
  17. package/dist/js/index.js.map +1 -1
  18. package/dist/js/integrations/appRegistry.d.ts +8 -0
  19. package/dist/js/integrations/appRegistry.d.ts.map +1 -0
  20. package/dist/js/integrations/appRegistry.js +43 -0
  21. package/dist/js/integrations/appRegistry.js.map +1 -0
  22. package/dist/js/integrations/default.d.ts.map +1 -1
  23. package/dist/js/integrations/default.js +5 -1
  24. package/dist/js/integrations/default.js.map +1 -1
  25. package/dist/js/integrations/exports.d.ts +2 -0
  26. package/dist/js/integrations/exports.d.ts.map +1 -1
  27. package/dist/js/integrations/exports.js +2 -0
  28. package/dist/js/integrations/exports.js.map +1 -1
  29. package/dist/js/replay/CustomMask.d.ts.map +1 -1
  30. package/dist/js/replay/CustomMask.js +3 -2
  31. package/dist/js/replay/CustomMask.js.map +1 -1
  32. package/dist/js/replay/mobilereplay.d.ts +23 -0
  33. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  34. package/dist/js/replay/mobilereplay.js +2 -0
  35. package/dist/js/replay/mobilereplay.js.map +1 -1
  36. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
  37. package/dist/js/tracing/integrations/appStart.js +41 -9
  38. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  39. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts +4 -0
  40. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -0
  41. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +193 -0
  42. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -0
  43. package/dist/js/tracing/ops.d.ts +2 -0
  44. package/dist/js/tracing/ops.d.ts.map +1 -1
  45. package/dist/js/tracing/ops.js +2 -0
  46. package/dist/js/tracing/ops.js.map +1 -1
  47. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  48. package/dist/js/tracing/reactnativeprofiler.js +5 -0
  49. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  50. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  51. package/dist/js/tracing/reactnativetracing.js +2 -1
  52. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  53. package/dist/js/tracing/reactnavigation.d.ts +20 -2
  54. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  55. package/dist/js/tracing/reactnavigation.js +69 -41
  56. package/dist/js/tracing/reactnavigation.js.map +1 -1
  57. package/dist/js/tracing/semanticAttributes.d.ts +2 -0
  58. package/dist/js/tracing/semanticAttributes.d.ts.map +1 -1
  59. package/dist/js/tracing/semanticAttributes.js +2 -0
  60. package/dist/js/tracing/semanticAttributes.js.map +1 -1
  61. package/dist/js/tracing/span.d.ts +13 -1
  62. package/dist/js/tracing/span.d.ts.map +1 -1
  63. package/dist/js/tracing/span.js +23 -0
  64. package/dist/js/tracing/span.js.map +1 -1
  65. package/dist/js/tracing/timeToDisplayFallback.d.ts +3 -0
  66. package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -0
  67. package/dist/js/tracing/timeToDisplayFallback.js +21 -0
  68. package/dist/js/tracing/timeToDisplayFallback.js.map +1 -0
  69. package/dist/js/tracing/timetodisplay.d.ts +29 -0
  70. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  71. package/dist/js/tracing/timetodisplay.js +43 -20
  72. package/dist/js/tracing/timetodisplay.js.map +1 -1
  73. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
  74. package/dist/js/tracing/timetodisplaynative.js +2 -1
  75. package/dist/js/tracing/timetodisplaynative.js.map +1 -1
  76. package/dist/js/tracing/timetodisplaynative.types.d.ts +1 -3
  77. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
  78. package/dist/js/tracing/timetodisplaynative.types.js.map +1 -1
  79. package/dist/js/utils/rnlibraries.d.ts +1 -1
  80. package/dist/js/utils/rnlibraries.d.ts.map +1 -1
  81. package/dist/js/utils/rnlibraries.js +5 -3
  82. package/dist/js/utils/rnlibraries.js.map +1 -1
  83. package/dist/js/utils/rnlibrariesinterface.d.ts +1 -0
  84. package/dist/js/utils/rnlibrariesinterface.d.ts.map +1 -1
  85. package/dist/js/utils/rnlibrariesinterface.js.map +1 -1
  86. package/dist/js/vendor/react-native/index.d.ts +3 -0
  87. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  88. package/dist/js/vendor/react-native/index.js.map +1 -1
  89. package/dist/js/vendor/react-navigation/types.d.ts +27 -0
  90. package/dist/js/vendor/react-navigation/types.d.ts.map +1 -0
  91. package/dist/js/vendor/react-navigation/types.js +3 -0
  92. package/dist/js/vendor/react-navigation/types.js.map +1 -0
  93. package/dist/js/version.d.ts +1 -1
  94. package/dist/js/version.d.ts.map +1 -1
  95. package/dist/js/version.js +1 -1
  96. package/dist/js/version.js.map +1 -1
  97. package/dist/js/wrapper.d.ts +8 -0
  98. package/dist/js/wrapper.d.ts.map +1 -1
  99. package/dist/js/wrapper.js +34 -0
  100. package/dist/js/wrapper.js.map +1 -1
  101. package/ios/RNSentry.mm +15 -6
  102. package/ios/RNSentryBreadcrumb.m +2 -1
  103. package/ios/RNSentryFramesTrackerListener.h +7 -3
  104. package/ios/RNSentryOnDrawReporter.h +6 -2
  105. package/ios/RNSentryOnDrawReporter.m +47 -20
  106. package/ios/RNSentryReplay.mm +3 -0
  107. package/ios/RNSentryTimeToDisplay.h +7 -0
  108. package/ios/RNSentryTimeToDisplay.m +69 -2
  109. package/ios/RNSentryVersion.m +1 -1
  110. package/package.json +4 -4
  111. package/plugin/build/withSentryAndroidGradlePlugin.js +4 -4
  112. package/scripts/sentry-xcode-debug-files.sh +1 -4
  113. package/scripts/sentry-xcode.sh +1 -4
  114. package/sentry.gradle +4 -2
  115. package/src/js/NativeRNSentry.ts +2 -0
  116. package/ts3.8/dist/js/NativeRNSentry.d.ts +2 -0
  117. package/ts3.8/dist/js/index.d.ts +2 -1
  118. package/ts3.8/dist/js/integrations/appRegistry.d.ts +8 -0
  119. package/ts3.8/dist/js/integrations/exports.d.ts +2 -0
  120. package/ts3.8/dist/js/replay/mobilereplay.d.ts +23 -0
  121. package/ts3.8/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts +4 -0
  122. package/ts3.8/dist/js/tracing/ops.d.ts +2 -0
  123. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +20 -2
  124. package/ts3.8/dist/js/tracing/semanticAttributes.d.ts +2 -0
  125. package/ts3.8/dist/js/tracing/span.d.ts +13 -1
  126. package/ts3.8/dist/js/tracing/timeToDisplayFallback.d.ts +3 -0
  127. package/ts3.8/dist/js/tracing/timetodisplay.d.ts +29 -0
  128. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +1 -3
  129. package/ts3.8/dist/js/utils/rnlibraries.d.ts +1 -1
  130. package/ts3.8/dist/js/utils/rnlibrariesinterface.d.ts +1 -0
  131. package/ts3.8/dist/js/vendor/react-native/index.d.ts +3 -0
  132. package/ts3.8/dist/js/vendor/react-navigation/types.d.ts +27 -0
  133. package/ts3.8/dist/js/version.d.ts +1 -1
  134. package/ts3.8/dist/js/wrapper.d.ts +8 -0
  135. package/dist/js/utils/sentryeventemitter.d.ts +0 -24
  136. package/dist/js/utils/sentryeventemitter.d.ts.map +0 -1
  137. package/dist/js/utils/sentryeventemitter.js +0 -82
  138. package/dist/js/utils/sentryeventemitter.js.map +0 -1
  139. package/dist/js/utils/sentryeventemitterfallback.d.ts +0 -19
  140. package/dist/js/utils/sentryeventemitterfallback.d.ts.map +0 -1
  141. package/dist/js/utils/sentryeventemitterfallback.js +0 -78
  142. package/dist/js/utils/sentryeventemitterfallback.js.map +0 -1
  143. package/ts3.8/dist/js/utils/sentryeventemitter.d.ts +0 -24
  144. package/ts3.8/dist/js/utils/sentryeventemitterfallback.d.ts +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,IAAI,OAAO,EACzB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,mBAAmB,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,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
package/dist/js/index.js CHANGED
@@ -5,8 +5,9 @@ export { SDK_NAME, SDK_VERSION } from './version';
5
5
  export { ReactNativeClient } from './client';
6
6
  export { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';
7
7
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
8
- export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, } from './tracing';
8
+ export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, } from './tracing';
9
9
  export { Mask, Unmask } from './replay/CustomMask';
10
10
  export { FeedbackWidget } from './feedback/FeedbackWidget';
11
11
  export { showFeedbackWidget } from './feedback/FeedbackWidgetManager';
12
+ export { getDataFromUri } from './wrapper';
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,IAAI,OAAO,EACzB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,6BAA6B,EAC7B,uCAAuC,EACvC,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,mCAAmC,GACpC,MAAM,WAAW,CAAC;AAInB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC","sourcesContent":["export type {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n SendFeedbackParams,\n SeverityLevel,\n Span,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n} from '@sentry/core';\n\nexport {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureFeedback,\n captureMessage,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n getRootSpan,\n withActiveSpan,\n suppressTracing,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metricsDefault as metrics,\n lastEventId,\n} from '@sentry/core';\n\nexport {\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n reactNativeTracingIntegration,\n getCurrentReactNativeTracingIntegration,\n getReactNativeTracingIntegration,\n reactNavigationIntegration,\n reactNativeNavigationIntegration,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n startIdleNavigationSpan,\n startIdleSpan,\n getDefaultIdleNavigationSpanOptions,\n} from './tracing';\n\nexport type { TimeToDisplayProps } from './tracing';\n\nexport { Mask, Unmask } from './replay/CustomMask';\n\nexport { FeedbackWidget } from './feedback/FeedbackWidget';\nexport { showFeedbackWidget } from './feedback/FeedbackWidgetManager';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EAC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\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n} from '@sentry/core';\n\nexport {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureFeedback,\n captureMessage,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n getRootSpan,\n withActiveSpan,\n suppressTracing,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metricsDefault as metrics,\n lastEventId,\n} from '@sentry/core';\n\nexport {\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n reactNativeTracingIntegration,\n getCurrentReactNativeTracingIntegration,\n getReactNativeTracingIntegration,\n reactNavigationIntegration,\n reactNativeNavigationIntegration,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n startIdleNavigationSpan,\n startIdleSpan,\n getDefaultIdleNavigationSpanOptions,\n createTimeToFullDisplay,\n createTimeToInitialDisplay,\n} from './tracing';\n\nexport type { TimeToDisplayProps } from './tracing';\n\nexport { Mask, Unmask } from './replay/CustomMask';\n\nexport { FeedbackWidget } from './feedback/FeedbackWidget';\nexport { showFeedbackWidget } from './feedback/FeedbackWidgetManager';\n\nexport { getDataFromUri } from './wrapper';\n"]}
@@ -0,0 +1,8 @@
1
+ import type { Client, Integration } from '@sentry/core';
2
+ export declare const INTEGRATION_NAME = "AppRegistry";
3
+ export declare const appRegistryIntegration: () => Integration & {
4
+ onRunApplication: (callback: () => void) => void;
5
+ };
6
+ export declare const patchAppRegistryRunApplication: (callbacks: (() => void)[]) => void;
7
+ export declare const getAppRegistryIntegration: (client?: Client | undefined) => ReturnType<typeof appRegistryIntegration> | undefined;
8
+ //# sourceMappingURL=appRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appRegistry.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/appRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAOxD,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,eAAO,MAAM,sBAAsB;iCACJ,MAAM,IAAI,KAAK,IAAI;CAqBjD,CAAC;AAEF,eAAO,MAAM,8BAA8B,cAAe,CAAC,MAAM,IAAI,CAAC,EAAE,KAAG,IAY1E,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAC5B,MAAM,GAAG,SAAS,KACzB,WAAW,6BAA6B,CAAC,GAAG,SAM9C,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { getClient, logger } from '@sentry/core';
2
+ import { isWeb } from '../utils/environment';
3
+ import { fillTyped } from '../utils/fill';
4
+ import { ReactNativeLibraries } from '../utils/rnlibraries';
5
+ export const INTEGRATION_NAME = 'AppRegistry';
6
+ export const appRegistryIntegration = () => {
7
+ const callbacks = [];
8
+ return {
9
+ name: INTEGRATION_NAME,
10
+ setupOnce: () => {
11
+ if (isWeb()) {
12
+ return;
13
+ }
14
+ patchAppRegistryRunApplication(callbacks);
15
+ },
16
+ onRunApplication: (callback) => {
17
+ if (callbacks.includes(callback)) {
18
+ logger.debug('[AppRegistryIntegration] Callback already registered.');
19
+ return;
20
+ }
21
+ callbacks.push(callback);
22
+ },
23
+ };
24
+ };
25
+ export const patchAppRegistryRunApplication = (callbacks) => {
26
+ const { AppRegistry } = ReactNativeLibraries;
27
+ if (!AppRegistry) {
28
+ return;
29
+ }
30
+ fillTyped(AppRegistry, 'runApplication', originalRunApplication => {
31
+ return (...args) => {
32
+ callbacks.forEach(callback => callback());
33
+ return originalRunApplication(...args);
34
+ };
35
+ });
36
+ };
37
+ export const getAppRegistryIntegration = (client = getClient()) => {
38
+ if (!client) {
39
+ return undefined;
40
+ }
41
+ return client.getIntegrationByName(INTEGRATION_NAME);
42
+ };
43
+ //# sourceMappingURL=appRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appRegistry.js","sourceRoot":"","sources":["../../../src/js/integrations/appRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAEpC,EAAE;IACF,MAAM,SAAS,GAAmB,EAAE,CAAC;IAErC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,IAAI,KAAK,EAAE,EAAE;gBACX,OAAO;aACR;YAED,8BAA8B,CAAC,SAAS,CAAC,CAAC;QAC5C,CAAC;QACD,gBAAgB,EAAE,CAAC,QAAoB,EAAE,EAAE;YACzC,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBAChC,MAAM,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;gBACtE,OAAO;aACR;YACD,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,SAAyB,EAAQ,EAAE;IAChF,MAAM,EAAE,WAAW,EAAE,GAAG,oBAAoB,CAAC;IAC7C,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO;KACR;IAED,SAAS,CAAC,WAAW,EAAE,gBAAgB,EAAE,sBAAsB,CAAC,EAAE;QAChE,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE;YACjB,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC1C,OAAO,sBAAsB,CAAC,GAAG,IAAI,CAAC,CAAC;QACzC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAA6B,SAAS,EAAE,EACe,EAAE;IACzD,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,MAAM,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;AACvD,CAAC,CAAC","sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { getClient, logger } from '@sentry/core';\n\nimport { isWeb } from '../utils/environment';\nimport { fillTyped } from '../utils/fill';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\n\nexport const INTEGRATION_NAME = 'AppRegistry';\n\nexport const appRegistryIntegration = (): Integration & {\n onRunApplication: (callback: () => void) => void;\n} => {\n const callbacks: (() => void)[] = [];\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n if (isWeb()) {\n return;\n }\n\n patchAppRegistryRunApplication(callbacks);\n },\n onRunApplication: (callback: () => void) => {\n if (callbacks.includes(callback)) {\n logger.debug('[AppRegistryIntegration] Callback already registered.');\n return;\n }\n callbacks.push(callback);\n },\n };\n};\n\nexport const patchAppRegistryRunApplication = (callbacks: (() => void)[]): void => {\n const { AppRegistry } = ReactNativeLibraries;\n if (!AppRegistry) {\n return;\n }\n\n fillTyped(AppRegistry, 'runApplication', originalRunApplication => {\n return (...args) => {\n callbacks.forEach(callback => callback());\n return originalRunApplication(...args);\n };\n });\n};\n\nexport const getAppRegistryIntegration = (\n client: Client | undefined = getClient(),\n): ReturnType<typeof appRegistryIntegration> | undefined => {\n if (!client) {\n return undefined;\n }\n\n return client.getIntegrationByName(INTEGRATION_NAME);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAmC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CA0GvF"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAqC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CA8GvF"}
@@ -1,6 +1,6 @@
1
1
  import { reactNativeTracingIntegration } from '../tracing';
2
2
  import { isExpoGo, notWeb } from '../utils/environment';
3
- import { appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
3
+ import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, timeToDisplayIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
4
4
  /**
5
5
  * Returns the default ReactNative integrations based on the current environment.
6
6
  *
@@ -66,8 +66,12 @@ export function getDefaultIntegrations(options) {
66
66
  integrations.push(userInteractionIntegration());
67
67
  }
68
68
  if (hasTracingEnabled && options.enableAutoPerformanceTracing) {
69
+ integrations.push(appRegistryIntegration());
69
70
  integrations.push(reactNativeTracingIntegration());
70
71
  }
72
+ if (hasTracingEnabled) {
73
+ integrations.push(timeToDisplayIntegration());
74
+ }
71
75
  if (options.enableCaptureFailedRequests) {
72
76
  integrations.push(httpClientIntegration());
73
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC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,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Integration } from '@sentry/core';\n\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { isExpoGo, notWeb } from '../utils/environment';\nimport {\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled =\n options.enableTracing ||\n typeof options.tracesSampleRate === 'number' ||\n typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(reactNativeTracingIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n if (isExpoGo()) {\n integrations.push(expoContextIntegration());\n }\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n return integrations;\n}\n"]}
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,mCAAmC,EACnC,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAiC;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EAAE,CAAC,CAAC;KACnD;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Integration } from '@sentry/core';\n\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { isExpoGo, notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled =\n options.enableTracing ||\n typeof options.tracesSampleRate === 'number' ||\n typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n if (isExpoGo()) {\n integrations.push(expoContextIntegration());\n }\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n return integrations;\n}\n"]}
@@ -20,5 +20,7 @@ export { nativeFramesIntegration, createNativeFramesIntegrations } from '../trac
20
20
  export { stallTrackingIntegration } from '../tracing/integrations/stalltracking';
21
21
  export { userInteractionIntegration } from '../tracing/integrations/userInteraction';
22
22
  export { createReactNativeRewriteFrames } from './rewriteframes';
23
+ export { appRegistryIntegration } from './appRegistry';
24
+ export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
23
25
  export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, } from '@sentry/react';
24
26
  //# sourceMappingURL=exports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OA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AC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,GACzB,MAAM,eAAe,CAAC"}
@@ -20,5 +20,7 @@ export { nativeFramesIntegration, createNativeFramesIntegrations } from '../trac
20
20
  export { stallTrackingIntegration } from '../tracing/integrations/stalltracking';
21
21
  export { userInteractionIntegration } from '../tracing/integrations/userInteraction';
22
22
  export { createReactNativeRewriteFrames } from './rewriteframes';
23
+ export { appRegistryIntegration } from './appRegistry';
24
+ export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
23
25
  export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, } from '@sentry/react';
24
26
  //# sourceMappingURL=exports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,GACzB,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\n\nexport {\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n} from '@sentry/react';\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,GACzB,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\nexport { appRegistryIntegration } from './appRegistry';\nexport { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';\n\nexport {\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n} from '@sentry/react';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CustomMask.d.ts","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAsB7D,QAAA,MAAM,YAAY,cAAe,SAAS,KAAG,MAAM,YAGlD,CAAC;AAEF,QAAA,MAAM,cAAc,cAAe,SAAS,KAAG,MAAM,YAGpD,CAAC;AAIF,QAAA,MAAM,IAAI,2DAWN,CAAA;AAEJ,QAAA,MAAM,MAAM,2DAWR,CAAC;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"CustomMask.d.ts","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAwB7D,QAAA,MAAM,YAAY,cAAe,SAAS,KAAG,MAAM,YAGlD,CAAC;AAEF,QAAA,MAAM,cAAc,cAAe,SAAS,KAAG,MAAM,YAGpD,CAAC;AAIF,QAAA,MAAM,IAAI,2DAWN,CAAA;AAEJ,QAAA,MAAM,MAAM,2DAWR,CAAC;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { logger } from '@sentry/core';
2
2
  import * as React from 'react';
3
3
  import { UIManager, View } from 'react-native';
4
+ import { isExpoGo } from '../utils/environment';
4
5
  const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
5
6
  const MaskNativeComponentName = 'RNSentryReplayMask';
6
7
  const UnmaskNativeComponentName = 'RNSentryReplayUnmask';
@@ -23,7 +24,7 @@ const UnmaskFallback = (viewProps) => {
23
24
  };
24
25
  const hasViewManagerConfig = (nativeComponentName) => UIManager.hasViewManagerConfig && UIManager.hasViewManagerConfig(nativeComponentName);
25
26
  const Mask = (() => {
26
- if (!hasViewManagerConfig(MaskNativeComponentName)) {
27
+ if (isExpoGo() || !hasViewManagerConfig(MaskNativeComponentName)) {
27
28
  logger.warn(`[SentrySessionReplay] Can't load ${MaskNativeComponentName}.`);
28
29
  return MaskFallback;
29
30
  }
@@ -34,7 +35,7 @@ const Mask = (() => {
34
35
  }));
35
36
  })();
36
37
  const Unmask = (() => {
37
- if (!hasViewManagerConfig(UnmaskNativeComponentName)) {
38
+ if (isExpoGo() || !hasViewManagerConfig(UnmaskNativeComponentName)) {
38
39
  logger.warn(`[SentrySessionReplay] Can't load ${UnmaskNativeComponentName}.`);
39
40
  return UnmaskFallback;
40
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CustomMask.js","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,uBAAuB,GAGzB,OAAO,CAAC,gEAAgE,CAAC,CAAC;AAE9E,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AACrD,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAEzD,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAU,EAAE,CAAC,yBAAyB,SAAS,2DAA2D,SAAS,+EAA+E,CAAC;AAEzO,MAAM,IAAI,GAAG,CAAC,SAAiB,EAAQ,EAAE;IACvC,UAAU,CAAC,GAAG,EAAE;QACd,gGAAgG;QAChG,4CAA4C;QAC5C,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAoB,EAAsB,EAAE;IAChE,IAAI,CAAC,MAAM,CAAC,CAAC;IACb,OAAO,oBAAC,IAAI,oBAAK,SAAS,EAAI,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,SAAoB,EAAsB,EAAE;IAClE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACf,OAAO,oBAAC,IAAI,oBAAK,SAAS,EAAI,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,mBAA2B,EAAW,EAAE,CAAC,SAAS,CAAC,oBAAoB,IAAI,SAAS,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;AAE7J,MAAM,IAAI,GAAG,CAAC,GAA8D,EAAE;IAC5E,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,EAAE;QAClD,MAAM,CAAC,IAAI,CAAC,oCAAoC,uBAAuB,GAAG,CAAC,CAAC;QAC5E,OAAO,YAAY,CAAC;KACrB;IAED,qDAAqD;IACrD,8KAA8K;IAC9K,OAAO,uBAAuB,CAAC,GAAG,CAAC,uBAAuB,EAAE,GAAG,EAAE,CAAC,CAAC;QACjE,eAAe,EAAE,uBAAuB;KACzC,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAA;AAEJ,MAAM,MAAM,GAAG,CAAC,GAA8D,EAAE;IAC9E,IAAI,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,EAAE;QACpD,MAAM,CAAC,IAAI,CAAC,oCAAoC,yBAAyB,GAAG,CAAC,CAAC;QAC9E,OAAO,cAAc,CAAC;KACvB;IAED,qDAAqD;IACrD,8KAA8K;IAC9K,OAAO,uBAAuB,CAAC,GAAG,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC;QACnE,eAAe,EAAE,yBAAyB;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport * as React from 'react';\nimport type { HostComponent, ViewProps } from 'react-native';\nimport { UIManager, View } from 'react-native';\n\nconst NativeComponentRegistry: {\n get<T, C extends Record<string, unknown>>(componentName: string, createViewConfig: () => C): HostComponent<T>;\n// eslint-disable-next-line @typescript-eslint/no-var-requires\n} = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');\n\nconst MaskNativeComponentName = 'RNSentryReplayMask';\nconst UnmaskNativeComponentName = 'RNSentryReplayUnmask';\n\nconst warnMessage = (component: string): string => `[SentrySessionReplay] ${component} component is not supported on the current platform. If ${component} should be supported, please ensure that the application build is up to date.`;\n\nconst warn = (component: string): void => {\n setTimeout(() => {\n // Missing mask component could cause leaking PII, we have to ensure that the warning is visible\n // even if the app is running without debug.\n // eslint-disable-next-line no-console\n console.warn(warnMessage(component));\n }, 0);\n};\n\nconst MaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Mask');\n return <View {...viewProps} />;\n};\n\nconst UnmaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Unmask');\n return <View {...viewProps} />;\n};\n\nconst hasViewManagerConfig = (nativeComponentName: string): boolean => UIManager.hasViewManagerConfig && UIManager.hasViewManagerConfig(nativeComponentName);\n\nconst Mask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (!hasViewManagerConfig(MaskNativeComponentName)) {\n logger.warn(`[SentrySessionReplay] Can't load ${MaskNativeComponentName}.`);\n return MaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(MaskNativeComponentName, () => ({\n uiViewClassName: MaskNativeComponentName,\n }));\n})()\n\nconst Unmask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (!hasViewManagerConfig(UnmaskNativeComponentName)) {\n logger.warn(`[SentrySessionReplay] Can't load ${UnmaskNativeComponentName}.`);\n return UnmaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(UnmaskNativeComponentName, () => ({\n uiViewClassName: UnmaskNativeComponentName,\n }));\n})();\n\nexport { Mask, Unmask, MaskFallback, UnmaskFallback };\n"]}
1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,GAAG,CAAC,GAA8D,EAAE;IAC5E,IAAI,QAAQ,EAAE,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,EAAE;QAChE,MAAM,CAAC,IAAI,CAAC,oCAAoC,uBAAuB,GAAG,CAAC,CAAC;QAC5E,OAAO,YAAY,CAAC;KACrB;IAED,qDAAqD;IACrD,8KAA8K;IAC9K,OAAO,uBAAuB,CAAC,GAAG,CAAC,uBAAuB,EAAE,GAAG,EAAE,CAAC,CAAC;QACjE,eAAe,EAAE,uBAAuB;KACzC,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAA;AAEJ,MAAM,MAAM,GAAG,CAAC,GAA8D,EAAE;IAC9E,IAAI,QAAQ,EAAE,IAAI,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,EAAE;QAClE,MAAM,CAAC,IAAI,CAAC,oCAAoC,yBAAyB,GAAG,CAAC,CAAC;QAC9E,OAAO,cAAc,CAAC;KACvB;IAED,qDAAqD;IACrD,8KAA8K;IAC9K,OAAO,uBAAuB,CAAC,GAAG,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC;QACnE,eAAe,EAAE,yBAAyB;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport * as React from 'react';\nimport type { HostComponent, ViewProps } from 'react-native';\nimport { UIManager, View } from 'react-native';\n\nimport { isExpoGo } from '../utils/environment';\n\nconst NativeComponentRegistry: {\n get<T, C extends Record<string, unknown>>(componentName: string, createViewConfig: () => C): HostComponent<T>;\n// eslint-disable-next-line @typescript-eslint/no-var-requires\n} = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');\n\nconst MaskNativeComponentName = 'RNSentryReplayMask';\nconst UnmaskNativeComponentName = 'RNSentryReplayUnmask';\n\nconst warnMessage = (component: string): string => `[SentrySessionReplay] ${component} component is not supported on the current platform. If ${component} should be supported, please ensure that the application build is up to date.`;\n\nconst warn = (component: string): void => {\n setTimeout(() => {\n // Missing mask component could cause leaking PII, we have to ensure that the warning is visible\n // even if the app is running without debug.\n // eslint-disable-next-line no-console\n console.warn(warnMessage(component));\n }, 0);\n};\n\nconst MaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Mask');\n return <View {...viewProps} />;\n};\n\nconst UnmaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Unmask');\n return <View {...viewProps} />;\n};\n\nconst hasViewManagerConfig = (nativeComponentName: string): boolean => UIManager.hasViewManagerConfig && UIManager.hasViewManagerConfig(nativeComponentName);\n\nconst Mask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (isExpoGo() || !hasViewManagerConfig(MaskNativeComponentName)) {\n logger.warn(`[SentrySessionReplay] Can't load ${MaskNativeComponentName}.`);\n return MaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(MaskNativeComponentName, () => ({\n uiViewClassName: MaskNativeComponentName,\n }));\n})()\n\nconst Unmask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (isExpoGo() || !hasViewManagerConfig(UnmaskNativeComponentName)) {\n logger.warn(`[SentrySessionReplay] Can't load ${UnmaskNativeComponentName}.`);\n return UnmaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(UnmaskNativeComponentName, () => ({\n uiViewClassName: UnmaskNativeComponentName,\n }));\n})();\n\nexport { Mask, Unmask, MaskFallback, UnmaskFallback };\n"]}
@@ -20,6 +20,29 @@ export interface MobileReplayOptions {
20
20
  * @default true
21
21
  */
22
22
  maskAllVectors?: boolean;
23
+ /**
24
+ * Enables the up to 5x faster experimental view renderer used by the Session Replay integration on iOS.
25
+ *
26
+ * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing
27
+ * interruptions and visual lag.
28
+ *
29
+ * - Experiment: This is an experimental feature and is therefore disabled by default.
30
+ *
31
+ * @default false
32
+ */
33
+ enableExperimentalViewRenderer?: boolean;
34
+ /**
35
+ * Enables up to 5x faster but incomplete view rendering used by the Session Replay integration on iOS.
36
+ *
37
+ * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing
38
+ * interruptions and visual lag.
39
+ *
40
+ * - Note: This flag can only be used together with `enableExperimentalViewRenderer` with up to 20% faster render times.
41
+ * - Experiment: This is an experimental feature and is therefore disabled by default.
42
+ *
43
+ * @default false
44
+ */
45
+ enableFastViewRendering?: boolean;
23
46
  }
24
47
  type MobileReplayIntegration = Integration & {
25
48
  options: Required<MobileReplayOptions>;
@@ -1 +1 @@
1
- {"version":3,"file":"mobilereplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyC,WAAW,EAAE,MAAM,cAAc,CAAC;AASvF,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAQD,KAAK,uBAAuB,GAAG,WAAW,GAAG;IAC3C,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,mBAAmB,KAAoB,uBAuE3F,CAAC"}
1
+ {"version":3,"file":"mobilereplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyC,WAAW,EAAE,MAAM,cAAc,CAAC;AASvF,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;OASG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC;;;;;;;;;;OAUG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAUD,KAAK,uBAAuB,GAAG,WAAW,GAAG;IAC3C,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,mBAAmB,KAAoB,uBAuE3F,CAAC"}
@@ -18,6 +18,8 @@ const defaultOptions = {
18
18
  maskAllText: true,
19
19
  maskAllImages: true,
20
20
  maskAllVectors: true,
21
+ enableExperimentalViewRenderer: false,
22
+ enableFastViewRendering: false,
21
23
  };
22
24
  /**
23
25
  * The Mobile Replay Integration, let's you adjust the default mobile replay options.
@@ -1 +1 @@
1
- {"version":3,"file":"mobilereplay.js","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,C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AI,CAAC,QAAQ,EAAE;gBACb,MAAM,CAAC,KAAK,CAAC,YAAY,8BAA8B,0BAA0B,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACpG,OAAO,KAAK,CAAC;aACd;YAED,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;IAED,SAAS,KAAK,CAAC,MAAc;QAC3B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACrB,OAAO;SACR;QAED,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,GAA2B,EAAE,EAAE;YACrD,IAAI,GAAG,CAAC,SAAS,EAAE;gBACjB,OAAO;aACR;YAED,6GAA6G;YAC7G,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC;YACpD,IAAI,eAAe,EAAE;gBACnB,GAAG,CAAC,SAAS,GAAG,eAAe,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,CAAC;IACxE,CAAC;IAED,iHAAiH;IACjH,8GAA8G;IAC9G,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,SAAS;YACP,UAAU;QACZ,CAAC;QACD,KAAK;QACL,YAAY;QACZ,OAAO,EAAE,OAAO;KACjB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAA4B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,SAAS;YACP,UAAU;QACZ,CAAC;QACD,OAAO,EAAE,cAAc;KACxB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Client, DynamicSamplingContext, Event, Integration } from '@sentry/core';\nimport { logger } from '@sentry/core';\n\nimport { isHardCrash } from '../misc';\nimport { hasHooks } from '../utils/clientutils';\nimport { isExpoGo, notMobileOs } from '../utils/environment';\nimport { NATIVE } from '../wrapper';\nimport { enrichXhrBreadcrumbsForMobileReplay } from './xhrUtils';\n\nexport const MOBILE_REPLAY_INTEGRATION_NAME = 'MobileReplay';\n\nexport interface MobileReplayOptions {\n /**\n * Mask all text in recordings\n *\n * @default true\n */\n maskAllText?: boolean;\n\n /**\n * Mask all images in recordings\n *\n * @default true\n */\n maskAllImages?: boolean;\n\n /**\n * Mask all vector graphics in recordings\n * Supports `react-native-svg`\n *\n * @default true\n */\n maskAllVectors?: boolean;\n}\n\nconst defaultOptions: Required<MobileReplayOptions> = {\n maskAllText: true,\n maskAllImages: true,\n maskAllVectors: true,\n};\n\ntype MobileReplayIntegration = Integration & {\n options: Required<MobileReplayOptions>;\n};\n\n/**\n * The Mobile Replay Integration, let's you adjust the default mobile replay options.\n * To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.\n *\n * ```javascript\n * Sentry.init({\n * replaysOnErrorSampleRate: 1.0,\n * replaysSessionSampleRate: 1.0,\n * integrations: [mobileReplayIntegration({\n * // Adjust the default options\n * })],\n * });\n * ```\n *\n * @experimental\n */\nexport const mobileReplayIntegration = (initOptions: MobileReplayOptions = defaultOptions): MobileReplayIntegration => {\n if (isExpoGo()) {\n logger.warn(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported in Expo Go. Use EAS Build or \\`expo prebuild\\` to enable it.`,\n );\n }\n if (notMobileOs()) {\n logger.warn(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported on this platform.`);\n }\n\n if (isExpoGo() || notMobileOs()) {\n return mobileReplayIntegrationNoop();\n }\n\n const options = { ...defaultOptions, ...initOptions };\n\n async function processEvent(event: Event): Promise<Event> {\n const hasException = event.exception && event.exception.values && event.exception.values.length > 0;\n if (!hasException) {\n // Event is not an error, will not capture replay\n return event;\n }\n\n const recordingReplayId = NATIVE.getCurrentReplayId();\n if (recordingReplayId) {\n logger.debug(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`,\n );\n return event;\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (!replayId) {\n logger.debug(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n return event;\n }\n\n return event;\n }\n\n function setup(client: Client): void {\n if (!hasHooks(client)) {\n return;\n }\n\n client.on('createDsc', (dsc: DynamicSamplingContext) => {\n if (dsc.replay_id) {\n return;\n }\n\n // TODO: For better performance, we should emit replayId changes on native, and hold the replayId value in JS\n const currentReplayId = NATIVE.getCurrentReplayId();\n if (currentReplayId) {\n dsc.replay_id = currentReplayId;\n }\n });\n\n client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);\n }\n\n // TODO: When adding manual API, ensure overlap with the web replay so users can use the same API interchangeably\n // https://github.com/getsentry/sentry-javascript/blob/develop/packages/replay-internal/src/integration.ts#L45\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setupOnce() {\n /* Noop */\n },\n setup,\n processEvent,\n options: options,\n };\n};\n\nconst mobileReplayIntegrationNoop = (): MobileReplayIntegration => {\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setupOnce() {\n /* Noop */\n },\n options: defaultOptions,\n };\n};\n"]}
1
+ {"version":3,"file":"mobilereplay.js","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,cAAc,CAAC;AAmD7D,MAAM,cAAc,GAAkC;IACpD,WAAW,EAAE,IAAI;IACjB,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C;gBACpG,OAAO,KAAK,CAAC;aACd;YAED,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;IAED,SAAS,KAAK,CAAC,MAAc;QAC3B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACrB,OAAO;SACR;QAED,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,GAA2B,EAAE,EAAE;YACrD,IAAI,GAAG,CAAC,SAAS,EAAE;gBACjB,OAAO;aACR;YAED,6GAA6G;YAC7G,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC;YACpD,IAAI,eAAe,EAAE;gBACnB,GAAG,CAAC,SAAS,GAAG,eAAe,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,CAAC;IACxE,CAAC;IAED,iHAAiH;IACjH,8GAA8G;IAC9G,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,SAAS;YACP,UAAU;QACZ,CAAC;QACD,KAAK;QACL,YAAY;QACZ,OAAO,EAAE,OAAO;KACjB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAA4B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,SAAS;YACP,UAAU;QACZ,CAAC;QACD,OAAO,EAAE,cAAc;KACxB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Client, DynamicSamplingContext, Event, Integration } from '@sentry/core';\nimport { logger } from '@sentry/core';\n\nimport { isHardCrash } from '../misc';\nimport { hasHooks } from '../utils/clientutils';\nimport { isExpoGo, notMobileOs } from '../utils/environment';\nimport { NATIVE } from '../wrapper';\nimport { enrichXhrBreadcrumbsForMobileReplay } from './xhrUtils';\n\nexport const MOBILE_REPLAY_INTEGRATION_NAME = 'MobileReplay';\n\nexport interface MobileReplayOptions {\n /**\n * Mask all text in recordings\n *\n * @default true\n */\n maskAllText?: boolean;\n\n /**\n * Mask all images in recordings\n *\n * @default true\n */\n maskAllImages?: boolean;\n\n /**\n * Mask all vector graphics in recordings\n * Supports `react-native-svg`\n *\n * @default true\n */\n maskAllVectors?: boolean;\n\n /**\n * Enables the up to 5x faster experimental view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @default false\n */\n enableExperimentalViewRenderer?: boolean;\n\n /**\n * Enables up to 5x faster but incomplete view rendering used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Note: This flag can only be used together with `enableExperimentalViewRenderer` with up to 20% faster render times.\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @default false\n */\n enableFastViewRendering?: boolean;\n}\n\nconst defaultOptions: Required<MobileReplayOptions> = {\n maskAllText: true,\n maskAllImages: true,\n maskAllVectors: true,\n enableExperimentalViewRenderer: false,\n enableFastViewRendering: false,\n};\n\ntype MobileReplayIntegration = Integration & {\n options: Required<MobileReplayOptions>;\n};\n\n/**\n * The Mobile Replay Integration, let's you adjust the default mobile replay options.\n * To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.\n *\n * ```javascript\n * Sentry.init({\n * replaysOnErrorSampleRate: 1.0,\n * replaysSessionSampleRate: 1.0,\n * integrations: [mobileReplayIntegration({\n * // Adjust the default options\n * })],\n * });\n * ```\n *\n * @experimental\n */\nexport const mobileReplayIntegration = (initOptions: MobileReplayOptions = defaultOptions): MobileReplayIntegration => {\n if (isExpoGo()) {\n logger.warn(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported in Expo Go. Use EAS Build or \\`expo prebuild\\` to enable it.`,\n );\n }\n if (notMobileOs()) {\n logger.warn(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported on this platform.`);\n }\n\n if (isExpoGo() || notMobileOs()) {\n return mobileReplayIntegrationNoop();\n }\n\n const options = { ...defaultOptions, ...initOptions };\n\n async function processEvent(event: Event): Promise<Event> {\n const hasException = event.exception && event.exception.values && event.exception.values.length > 0;\n if (!hasException) {\n // Event is not an error, will not capture replay\n return event;\n }\n\n const recordingReplayId = NATIVE.getCurrentReplayId();\n if (recordingReplayId) {\n logger.debug(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`,\n );\n return event;\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (!replayId) {\n logger.debug(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n return event;\n }\n\n return event;\n }\n\n function setup(client: Client): void {\n if (!hasHooks(client)) {\n return;\n }\n\n client.on('createDsc', (dsc: DynamicSamplingContext) => {\n if (dsc.replay_id) {\n return;\n }\n\n // TODO: For better performance, we should emit replayId changes on native, and hold the replayId value in JS\n const currentReplayId = NATIVE.getCurrentReplayId();\n if (currentReplayId) {\n dsc.replay_id = currentReplayId;\n }\n });\n\n client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);\n }\n\n // TODO: When adding manual API, ensure overlap with the web replay so users can use the same API interchangeably\n // https://github.com/getsentry/sentry-javascript/blob/develop/packages/replay-internal/src/integration.ts#L45\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setupOnce() {\n /* Noop */\n },\n setup,\n processEvent,\n options: options,\n };\n};\n\nconst mobileReplayIntegrationNoop = (): MobileReplayIntegration => {\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setupOnce() {\n /* Noop */\n },\n options: defaultOptions,\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"appStart.d.ts","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/appStart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,WAAW,EAAoC,MA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AC,WAAW,EAAE,MAAM,GAAG,IAAI,CAM7E;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAG9E;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,gBAAiB,MAAM,KAAG,IAGhE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sCAAsC,IAAI,IAAI,CAE7D;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAG9B;;;;;OAKG;iBACU,OAAO;MACb,mBA0QR,CAAC"}
@@ -8,12 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { getCapturedScopesOnSpan, getClient, getCurrentScope, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SentryNonRecordingSpan, startInactiveSpan, timestampInSeconds, } from '@sentry/core';
11
+ import { getAppRegistryIntegration } from '../../integrations/appRegistry';
11
12
  import { APP_START_COLD as APP_START_COLD_MEASUREMENT, APP_START_WARM as APP_START_WARM_MEASUREMENT, } from '../../measurements';
12
13
  import { convertSpanToTransaction, isRootSpan, setEndTimeValue } from '../../utils/span';
13
14
  import { NATIVE } from '../../wrapper';
14
15
  import { APP_START_COLD as APP_START_COLD_OP, APP_START_WARM as APP_START_WARM_OP, UI_LOAD as UI_LOAD_OP, } from '../ops';
15
16
  import { SPAN_ORIGIN_AUTO_APP_START, SPAN_ORIGIN_MANUAL_APP_START } from '../origin';
16
17
  import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '../semanticAttributes';
18
+ import { setMainThreadInfo } from '../span';
17
19
  import { createChildSpanJSON, createSpanJSON, getBundleStartTimestampMs } from '../utils';
18
20
  const INTEGRATION_NAME = 'AppStart';
19
21
  /**
@@ -99,6 +101,7 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
99
101
  let _client = undefined;
100
102
  let isEnabled = true;
101
103
  let appStartDataFlushed = false;
104
+ let afterAllSetupCalled = false;
102
105
  let firstStartedActiveRootSpanId = undefined;
103
106
  const setup = (client) => {
104
107
  _client = client;
@@ -109,8 +112,23 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
109
112
  }
110
113
  client.on('spanStart', recordFirstStartedActiveRootSpanId);
111
114
  };
112
- const afterAllSetup = (_client) => {
115
+ const afterAllSetup = (client) => {
116
+ var _a;
117
+ if (afterAllSetupCalled) {
118
+ return;
119
+ }
120
+ afterAllSetupCalled = true;
113
121
  // TODO: automatically set standalone based on the presence of the native layer navigation integration
122
+ (_a = getAppRegistryIntegration(client)) === null || _a === void 0 ? void 0 : _a.onRunApplication(() => {
123
+ if (appStartDataFlushed) {
124
+ logger.log('[AppStartIntegration] Resetting app start data flushed flag based on runApplication call.');
125
+ appStartDataFlushed = false;
126
+ firstStartedActiveRootSpanId = undefined;
127
+ }
128
+ else {
129
+ logger.log('[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call.');
130
+ }
131
+ });
114
132
  };
115
133
  const processEvent = (event) => __awaiter(void 0, void 0, void 0, function* () {
116
134
  if (!isEnabled || standalone) {
@@ -175,7 +193,7 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
175
193
  function attachAppStartToTransactionEvent(event) {
176
194
  return __awaiter(this, void 0, void 0, function* () {
177
195
  if (appStartDataFlushed) {
178
- // App start data is only relevant for the first transaction
196
+ // App start data is only relevant for the first transaction of the app run
179
197
  return;
180
198
  }
181
199
  if (!firstStartedActiveRootSpanId) {
@@ -220,6 +238,13 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
220
238
  logger.warn('[AppStart] App start duration is over a minute long, not adding app start span.');
221
239
  return;
222
240
  }
241
+ if (appStartDurationMs < 0) {
242
+ // This can happen when MainActivity on Android is recreated,
243
+ // and the app start end timestamp is not updated, for example
244
+ // due to missing `Sentry.wrap(RootComponent)` call.
245
+ logger.warn('[AppStart] Last recorded app start end timestamp is before the app start timestamp.', 'This is usually caused by missing `Sentry.wrap(RootComponent)` call.');
246
+ return;
247
+ }
223
248
  appStartDataFlushed = true;
224
249
  event.contexts.trace.data = event.contexts.trace.data || {};
225
250
  event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD_OP;
@@ -303,18 +328,23 @@ function createJSExecutionStartSpan(parentSpan, rootComponentCreationTimestampMs
303
328
  if (!bundleStartTimestampMs) {
304
329
  return undefined;
305
330
  }
331
+ const bundleStartTimestampSeconds = bundleStartTimestampMs / 1000;
332
+ if (bundleStartTimestampSeconds < parentSpan.start_timestamp) {
333
+ logger.warn('Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span.');
334
+ return undefined;
335
+ }
306
336
  if (!rootComponentCreationTimestampMs) {
307
337
  logger.warn('Missing the root component first constructor call timestamp.');
308
338
  return createChildSpanJSON(parentSpan, {
309
339
  description: 'JS Bundle Execution Start',
310
- start_timestamp: bundleStartTimestampMs / 1000,
311
- timestamp: bundleStartTimestampMs / 1000,
340
+ start_timestamp: bundleStartTimestampSeconds,
341
+ timestamp: bundleStartTimestampSeconds,
312
342
  origin: SPAN_ORIGIN_AUTO_APP_START,
313
343
  });
314
344
  }
315
345
  return createChildSpanJSON(parentSpan, {
316
346
  description: 'JS Bundle Execution Before React Root',
317
- start_timestamp: bundleStartTimestampMs / 1000,
347
+ start_timestamp: bundleStartTimestampSeconds,
318
348
  timestamp: rootComponentCreationTimestampMs / 1000,
319
349
  origin: isRootComponentCreationTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START,
320
350
  });
@@ -323,16 +353,18 @@ function createJSExecutionStartSpan(parentSpan, rootComponentCreationTimestampMs
323
353
  * Adds native spans to the app start span.
324
354
  */
325
355
  function convertNativeSpansToSpanJSON(parentSpan, nativeSpans) {
326
- return nativeSpans.map(span => {
356
+ return nativeSpans
357
+ .filter(span => span.start_timestamp_ms / 1000 >= parentSpan.start_timestamp)
358
+ .map(span => {
327
359
  if (span.description === 'UIKit init') {
328
- return createUIKitSpan(parentSpan, span);
360
+ return setMainThreadInfo(createUIKitSpan(parentSpan, span));
329
361
  }
330
- return createChildSpanJSON(parentSpan, {
362
+ return setMainThreadInfo(createChildSpanJSON(parentSpan, {
331
363
  description: span.description,
332
364
  start_timestamp: span.start_timestamp_ms / 1000,
333
365
  timestamp: span.end_timestamp_ms / 1000,
334
366
  origin: SPAN_ORIGIN_AUTO_APP_START,
335
- });
367
+ }));
336
368
  });
337
369
  }
338
370
  /**