@sentry/react-native 7.0.0-rc.1 → 7.0.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 (151) hide show
  1. package/RNSentry.podspec +3 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +50 -5
  4. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  5. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +5 -0
  6. package/dist/js/NativeRNSentry.d.ts +1 -0
  7. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  8. package/dist/js/NativeRNSentry.js.map +1 -1
  9. package/dist/js/client.d.ts +2 -2
  10. package/dist/js/client.d.ts.map +1 -1
  11. package/dist/js/client.js +8 -8
  12. package/dist/js/client.js.map +1 -1
  13. package/dist/js/feedback/FeedbackWidget.js +12 -12
  14. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  15. package/dist/js/feedback/FeedbackWidgetManager.js +2 -2
  16. package/dist/js/feedback/FeedbackWidgetManager.js.map +1 -1
  17. package/dist/js/feedback/FeedbackWidgetProvider.js +3 -3
  18. package/dist/js/feedback/FeedbackWidgetProvider.js.map +1 -1
  19. package/dist/js/integrations/appRegistry.js +2 -2
  20. package/dist/js/integrations/appRegistry.js.map +1 -1
  21. package/dist/js/integrations/debugsymbolicator.js +3 -3
  22. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  23. package/dist/js/integrations/debugsymbolicatorutils.js +3 -3
  24. package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -1
  25. package/dist/js/integrations/default.d.ts.map +1 -1
  26. package/dist/js/integrations/default.js +4 -1
  27. package/dist/js/integrations/default.js.map +1 -1
  28. package/dist/js/integrations/devicecontext.js +2 -2
  29. package/dist/js/integrations/devicecontext.js.map +1 -1
  30. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  31. package/dist/js/integrations/expocontext.js +2 -2
  32. package/dist/js/integrations/expocontext.js.map +1 -1
  33. package/dist/js/integrations/exports.d.ts +1 -0
  34. package/dist/js/integrations/exports.d.ts.map +1 -1
  35. package/dist/js/integrations/exports.js +1 -0
  36. package/dist/js/integrations/exports.js.map +1 -1
  37. package/dist/js/integrations/logEnricherIntegration.d.ts +3 -0
  38. package/dist/js/integrations/logEnricherIntegration.d.ts.map +1 -0
  39. package/dist/js/integrations/logEnricherIntegration.js +65 -0
  40. package/dist/js/integrations/logEnricherIntegration.js.map +1 -0
  41. package/dist/js/integrations/modulesloader.js +2 -2
  42. package/dist/js/integrations/modulesloader.js.map +1 -1
  43. package/dist/js/integrations/reactnativeerrorhandlers.js +12 -12
  44. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  45. package/dist/js/integrations/reactnativeerrorhandlersutils.js +6 -6
  46. package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -1
  47. package/dist/js/integrations/sdkinfo.js +3 -3
  48. package/dist/js/integrations/sdkinfo.js.map +1 -1
  49. package/dist/js/integrations/spotlight.js +4 -4
  50. package/dist/js/integrations/spotlight.js.map +1 -1
  51. package/dist/js/integrations/viewhierarchy.js +2 -2
  52. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  53. package/dist/js/options.d.ts +1 -1
  54. package/dist/js/options.d.ts.map +1 -1
  55. package/dist/js/options.js.map +1 -1
  56. package/dist/js/playground/modal.js +3 -3
  57. package/dist/js/playground/modal.js.map +1 -1
  58. package/dist/js/profiling/convertHermesProfile.js +5 -5
  59. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  60. package/dist/js/profiling/debugid.d.ts.map +1 -1
  61. package/dist/js/profiling/debugid.js +2 -2
  62. package/dist/js/profiling/debugid.js.map +1 -1
  63. package/dist/js/profiling/integration.js +13 -13
  64. package/dist/js/profiling/integration.js.map +1 -1
  65. package/dist/js/profiling/utils.js +3 -3
  66. package/dist/js/profiling/utils.js.map +1 -1
  67. package/dist/js/replay/CustomMask.js +3 -3
  68. package/dist/js/replay/CustomMask.js.map +1 -1
  69. package/dist/js/replay/mobilereplay.js +5 -5
  70. package/dist/js/replay/mobilereplay.js.map +1 -1
  71. package/dist/js/sdk.js +7 -7
  72. package/dist/js/sdk.js.map +1 -1
  73. package/dist/js/tools/ModulesCollector.js +12 -12
  74. package/dist/js/tools/ModulesCollector.js.map +1 -1
  75. package/dist/js/tools/enableLogger.js +1 -1
  76. package/dist/js/tools/enableLogger.js.map +1 -1
  77. package/dist/js/tools/metroMiddleware.js +6 -6
  78. package/dist/js/tools/metroMiddleware.js.map +1 -1
  79. package/dist/js/tools/metroconfig.js +2 -2
  80. package/dist/js/tools/metroconfig.js.map +1 -1
  81. package/dist/js/tools/sentryBabelTransformerUtils.d.ts.map +1 -1
  82. package/dist/js/tools/sentryBabelTransformerUtils.js +6 -6
  83. package/dist/js/tools/sentryBabelTransformerUtils.js.map +1 -1
  84. package/dist/js/tools/utils.d.ts.map +1 -1
  85. package/dist/js/tools/utils.js +39 -10
  86. package/dist/js/tools/utils.js.map +1 -1
  87. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  88. package/dist/js/tools/vendor/metro/utils.js +28 -6
  89. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  90. package/dist/js/touchevents.js +3 -3
  91. package/dist/js/touchevents.js.map +1 -1
  92. package/dist/js/tracing/gesturetracing.js +5 -5
  93. package/dist/js/tracing/gesturetracing.js.map +1 -1
  94. package/dist/js/tracing/integrations/appStart.js +34 -34
  95. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  96. package/dist/js/tracing/integrations/nativeFrames.js +14 -14
  97. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  98. package/dist/js/tracing/integrations/stalltracking.js +7 -7
  99. package/dist/js/tracing/integrations/stalltracking.js.map +1 -1
  100. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +11 -11
  101. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
  102. package/dist/js/tracing/integrations/userInteraction.js +8 -8
  103. package/dist/js/tracing/integrations/userInteraction.js.map +1 -1
  104. package/dist/js/tracing/onSpanEndUtils.js +10 -10
  105. package/dist/js/tracing/onSpanEndUtils.js.map +1 -1
  106. package/dist/js/tracing/reactnativeprofiler.js +2 -2
  107. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  108. package/dist/js/tracing/reactnavigation.js +14 -14
  109. package/dist/js/tracing/reactnavigation.js.map +1 -1
  110. package/dist/js/tracing/span.js +6 -6
  111. package/dist/js/tracing/span.js.map +1 -1
  112. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  113. package/dist/js/tracing/timetodisplay.js +20 -30
  114. package/dist/js/tracing/timetodisplay.js.map +1 -1
  115. package/dist/js/tracing/utils.js +2 -2
  116. package/dist/js/tracing/utils.js.map +1 -1
  117. package/dist/js/utils/environment.d.ts.map +1 -1
  118. package/dist/js/utils/environment.js +2 -1
  119. package/dist/js/utils/environment.js.map +1 -1
  120. package/dist/js/utils/safe.js +3 -3
  121. package/dist/js/utils/safe.js.map +1 -1
  122. package/dist/js/utils/worldwide.d.ts +1 -0
  123. package/dist/js/utils/worldwide.d.ts.map +1 -1
  124. package/dist/js/utils/worldwide.js.map +1 -1
  125. package/dist/js/version.d.ts +1 -1
  126. package/dist/js/version.d.ts.map +1 -1
  127. package/dist/js/version.js +1 -1
  128. package/dist/js/version.js.map +1 -1
  129. package/dist/js/wrapper.d.ts +1 -0
  130. package/dist/js/wrapper.d.ts.map +1 -1
  131. package/dist/js/wrapper.js +40 -26
  132. package/dist/js/wrapper.js.map +1 -1
  133. package/ios/RNSentry+fetchNativeStack.m +101 -0
  134. package/ios/RNSentry.h +5 -0
  135. package/ios/RNSentry.mm +67 -77
  136. package/ios/RNSentryVersion.m +1 -1
  137. package/package.json +15 -14
  138. package/plugin/build/withSentryAndroid.js +7 -7
  139. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +3 -2
  140. package/plugin/build/withSentryAndroidGradlePlugin.js +11 -22
  141. package/scripts/expo-upload-sourcemaps.js +1 -1
  142. package/scripts/sentry_utils.rb +4 -0
  143. package/src/js/NativeRNSentry.ts +1 -0
  144. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -0
  145. package/ts3.8/dist/js/client.d.ts +2 -2
  146. package/ts3.8/dist/js/integrations/exports.d.ts +1 -0
  147. package/ts3.8/dist/js/integrations/logEnricherIntegration.d.ts +3 -0
  148. package/ts3.8/dist/js/options.d.ts +1 -1
  149. package/ts3.8/dist/js/utils/worldwide.d.ts +1 -0
  150. package/ts3.8/dist/js/version.d.ts +1 -1
  151. package/ts3.8/dist/js/wrapper.d.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/js/tracing/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,0CAA0C,EAC1C,2CAA2C,EAC3C,4BAA4B,EAC5B,gCAAgC,EAChC,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,KAAK,GACN,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAsB,WAAW,CAAC;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAsB,QAAQ,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,MAAM,sBAAsB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,SAA6B;IACvD,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,GAAG,SAAS,CAAC,IAAI,uBAAuB,CAAC;AAC/E,CAAC;AAED;;;GAGG;A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AChB,IAAmG;IAEnG,OAAO,cAAc,iBACnB,EAAE,EAAE,MAAM,CAAC,EAAE,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,cAAc,EAAE,MAAM,CAAC,OAAO,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,qBAAqB,IAC3C,IAAI,EACP,CAAC;AACL,CAAC","sourcesContent":["import type { MeasurementUnit, Span, SpanJSON, TransactionSource } from '@sentry/core';\nimport {\n dropUndefinedKeys,\n getSpanDescendants,\n logger,\n SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n setMeasurement,\n spanToJSON,\n timestampInSeconds,\n uuid4,\n} from '@sentry/core';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\n\nexport const defaultTransactionSource: TransactionSource = 'component';\nexport const customTransactionSource: TransactionSource = 'custom';\n\n/**\n * A margin of error of 50ms is allowed for the async native bridge call.\n * Anything larger would reduce the accuracy of our frames measurements.\n */\nexport const MARGIN_OF_ERROR_SECONDS = 0.05;\n\nconst timeOriginMilliseconds = Date.now();\n\n/**\n * Returns the timestamp where the JS global scope was initialized.\n */\nexport function getTimeOriginMilliseconds(): number {\n return timeOriginMilliseconds;\n}\n\n/**\n * Determines if the timestamp is now or within the specified margin of error from now.\n */\nexport function isNearToNow(timestamp: number | undefined): boolean {\n if (!timestamp) {\n return false;\n }\n return Math.abs(timestampInSeconds() - timestamp) <= MARGIN_OF_ERROR_SECONDS;\n}\n\n/**\n * Sets the duration of the span as a measurement.\n * Uses `setMeasurement` function from @sentry/core.\n */\nexport function setSpanDurationAsMeasurement(name: string, span: Span): void {\n const { timestamp: spanEnd, start_timestamp: spanStart } = spanToJSON(span);\n if (!spanEnd || !spanStart) {\n return;\n }\n\n setMeasurement(name, (spanEnd - spanStart) * 1000, 'millisecond');\n}\n\n/**\n * Sets the duration of the span as a measurement.\n * Uses `setMeasurement` function from @sentry/core.\n */\nexport function setSpanDurationAsMeasurementOnSpan(name: string, span: Span, on: Span): void {\n const { timestamp: spanEnd, start_timestamp: spanStart } = spanToJSON(span);\n if (!spanEnd || !spanStart) {\n return;\n }\n\n setSpanMeasurement(on, name, (spanEnd - spanStart) * 1000, 'millisecond');\n}\n\n/**\n * Sets measurement on the give span.\n */\nexport function setSpanMeasurement(span: Span, key: string, value: number, unit: MeasurementUnit): void {\n span.addEvent(key, {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit as string,\n });\n}\n\n/**\n * Returns the latest end timestamp of the child spans of the given span.\n */\nexport function getLatestChildSpanEndTimestamp(span: Span): number | undefined {\n const childEndTimestamps = getSpanDescendants(span)\n .map(span => spanToJSON(span).timestamp)\n .filter(timestamp => !!timestamp) as number[];\n\n return childEndTimestamps.length ? Math.max(...childEndTimestamps) : undefined;\n}\n\n/**\n * Returns unix timestamp in ms of the bundle start time.\n *\n * If not available, returns undefined.\n */\nexport function getBundleStartTimestampMs(): number | undefined {\n const bundleStartTime = RN_GLOBAL_OBJ.__BUNDLE_START_TIME__;\n if (!bundleStartTime) {\n logger.warn('Missing the bundle start time on the global object.');\n return undefined;\n }\n\n if (!RN_GLOBAL_OBJ.nativePerformanceNow) {\n // bundleStartTime is Date.now() in milliseconds\n return bundleStartTime;\n }\n\n // nativePerformanceNow() is monotonic clock like performance.now()\n const approxStartingTimeOrigin = Date.now() - RN_GLOBAL_OBJ.nativePerformanceNow();\n return approxStartingTimeOrigin + bundleStartTime;\n}\n\n/**\n * Creates valid span JSON object from the given data.\n */\nexport function createSpanJSON(\n from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp' | 'origin'>,\n): SpanJSON {\n return dropUndefinedKeys({\n status: 'ok',\n ...from,\n span_id: from.span_id ? from.span_id : uuid4().substring(16),\n trace_id: from.trace_id ? from.trace_id : uuid4(),\n data: dropUndefinedKeys({\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: from.op,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: from.origin,\n ...(from.data ? from.data : {}),\n }),\n });\n}\n\nconst SENTRY_DEFAULT_ORIGIN = 'manual';\n\n/**\n *\n */\nexport function createChildSpanJSON(\n parent: SpanJSON,\n from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp'>,\n): SpanJSON {\n return createSpanJSON({\n op: parent.op,\n trace_id: parent.trace_id,\n parent_span_id: parent.span_id,\n origin: parent.origin || SENTRY_DEFAULT_ORIGIN,\n ...from,\n });\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/js/tracing/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,iBAAiB,EACjB,kBAAkB,EAClB,0CAA0C,EAC1C,2CAA2C,EAC3C,4BAA4B,EAC5B,gCAAgC,EAChC,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,KAAK,GACN,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAsB,WAAW,CAAC;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAsB,QAAQ,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,MAAM,sBAAsB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,SAA6B;IACvD,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,KAAK,CAAC;KACd;IACD,OAAO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C;AACL,CAAC;AAED,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAEvC;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAgB,EAChB,IAAmG;IAEnG,OAAO,cAAc,iBACnB,EAAE,EAAE,MAAM,CAAC,EAAE,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,cAAc,EAAE,MAAM,CAAC,OAAO,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,qBAAqB,IAC3C,IAAI,EACP,CAAC;AACL,CAAC","sourcesContent":["import type { MeasurementUnit, Span, SpanJSON, TransactionSource } from '@sentry/core';\nimport {\n debug,\n dropUndefinedKeys,\n getSpanDescendants,\n SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n setMeasurement,\n spanToJSON,\n timestampInSeconds,\n uuid4,\n} from '@sentry/core';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\n\nexport const defaultTransactionSource: TransactionSource = 'component';\nexport const customTransactionSource: TransactionSource = 'custom';\n\n/**\n * A margin of error of 50ms is allowed for the async native bridge call.\n * Anything larger would reduce the accuracy of our frames measurements.\n */\nexport const MARGIN_OF_ERROR_SECONDS = 0.05;\n\nconst timeOriginMilliseconds = Date.now();\n\n/**\n * Returns the timestamp where the JS global scope was initialized.\n */\nexport function getTimeOriginMilliseconds(): number {\n return timeOriginMilliseconds;\n}\n\n/**\n * Determines if the timestamp is now or within the specified margin of error from now.\n */\nexport function isNearToNow(timestamp: number | undefined): boolean {\n if (!timestamp) {\n return false;\n }\n return Math.abs(timestampInSeconds() - timestamp) <= MARGIN_OF_ERROR_SECONDS;\n}\n\n/**\n * Sets the duration of the span as a measurement.\n * Uses `setMeasurement` function from @sentry/core.\n */\nexport function setSpanDurationAsMeasurement(name: string, span: Span): void {\n const { timestamp: spanEnd, start_timestamp: spanStart } = spanToJSON(span);\n if (!spanEnd || !spanStart) {\n return;\n }\n\n setMeasurement(name, (spanEnd - spanStart) * 1000, 'millisecond');\n}\n\n/**\n * Sets the duration of the span as a measurement.\n * Uses `setMeasurement` function from @sentry/core.\n */\nexport function setSpanDurationAsMeasurementOnSpan(name: string, span: Span, on: Span): void {\n const { timestamp: spanEnd, start_timestamp: spanStart } = spanToJSON(span);\n if (!spanEnd || !spanStart) {\n return;\n }\n\n setSpanMeasurement(on, name, (spanEnd - spanStart) * 1000, 'millisecond');\n}\n\n/**\n * Sets measurement on the give span.\n */\nexport function setSpanMeasurement(span: Span, key: string, value: number, unit: MeasurementUnit): void {\n span.addEvent(key, {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit as string,\n });\n}\n\n/**\n * Returns the latest end timestamp of the child spans of the given span.\n */\nexport function getLatestChildSpanEndTimestamp(span: Span): number | undefined {\n const childEndTimestamps = getSpanDescendants(span)\n .map(span => spanToJSON(span).timestamp)\n .filter(timestamp => !!timestamp) as number[];\n\n return childEndTimestamps.length ? Math.max(...childEndTimestamps) : undefined;\n}\n\n/**\n * Returns unix timestamp in ms of the bundle start time.\n *\n * If not available, returns undefined.\n */\nexport function getBundleStartTimestampMs(): number | undefined {\n const bundleStartTime = RN_GLOBAL_OBJ.__BUNDLE_START_TIME__;\n if (!bundleStartTime) {\n debug.warn('Missing the bundle start time on the global object.');\n return undefined;\n }\n\n if (!RN_GLOBAL_OBJ.nativePerformanceNow) {\n // bundleStartTime is Date.now() in milliseconds\n return bundleStartTime;\n }\n\n // nativePerformanceNow() is monotonic clock like performance.now()\n const approxStartingTimeOrigin = Date.now() - RN_GLOBAL_OBJ.nativePerformanceNow();\n return approxStartingTimeOrigin + bundleStartTime;\n}\n\n/**\n * Creates valid span JSON object from the given data.\n */\nexport function createSpanJSON(\n from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp' | 'origin'>,\n): SpanJSON {\n return dropUndefinedKeys({\n status: 'ok',\n ...from,\n span_id: from.span_id ? from.span_id : uuid4().substring(16),\n trace_id: from.trace_id ? from.trace_id : uuid4(),\n data: dropUndefinedKeys({\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: from.op,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: from.origin,\n ...(from.data ? from.data : {}),\n }),\n });\n}\n\nconst SENTRY_DEFAULT_ORIGIN = 'manual';\n\n/**\n *\n */\nexport function createChildSpanJSON(\n parent: SpanJSON,\n from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp'>,\n): SpanJSON {\n return createSpanJSON({\n op: parent.op,\n trace_id: parent.trace_id,\n parent_span_id: parent.span_id,\n origin: parent.origin || SENTRY_DEFAULT_ORIGIN,\n ...from,\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAKA,0DAA0D;AAC1D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAM1D;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,kCAAkC;AAClC,wBAAgB,QAAQ,IAAI,OAAO,CAGlC;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAGrD;AAED,4CAA4C;AAC5C,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAKtD;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,gDAAgD;AAChD,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,mFAAmF;AACnF,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,uFAAuF;AACvF,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,aAAa,GAAG,YAAY,CAEpE;AAED,iDAAiD;AACjD,wBAAgB,yBAAyB,IAAI,OAAO,CAQnD"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAKA,0DAA0D;AAC1D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAM1D;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,kCAAkC;AAClC,wBAAgB,QAAQ,IAAI,OAAO,CAGlC;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAGrD;AAED,4CAA4C;AAC5C,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAKtD;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,gDAAgD;AAChD,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,mFAAmF;AACnF,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,uFAAuF;AACvF,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,aAAa,GAAG,YAAY,CAEpE;AAED,iDAAiD;AACjD,wBAAgB,yBAAyB,IAAI,OAAO,CAQnD"}
@@ -8,7 +8,8 @@ export function isHermesEnabled() {
8
8
  }
9
9
  /** Checks if the React Native TurboModules are enabled */
10
10
  export function isTurboModuleEnabled() {
11
- return RN_GLOBAL_OBJ.__turboModuleProxy != null;
11
+ // Reference: https://github.com/facebook/react-native/blob/641a79dc5137b69a3c0813413b9fb82d0b9df783/packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js#L110
12
+ return RN_GLOBAL_OBJ.RN$Bridgeless === true || RN_GLOBAL_OBJ.__turboModuleProxy != null;
12
13
  }
13
14
  /** Checks if the React Native Fabric renderer is running */
14
15
  export function isFabricEnabled() {
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,0DAA0D;AAC1D,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC;AACxC,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,oBAAoB;IAClC,OAAO,aAAa,CAAC,kBAAkB,IAAI,IAAI,CAAC;AAClD,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC,qBAAqB,IAAI,IAAI,CAAC;AACrD,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,qBAAqB;IACnC,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE;QAC5C,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,GAAG,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,OA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,CAAC,EAAE,KAAK,KAAK,CAAC;AAC/B,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,UAAU;IACxB,OAAO,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,CAAC;AAC5D,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,gBAAgB;;IAC9B,OAAO,MAAA,MAAA,aAAa,CAAC,cAAc,0CAAE,oBAAoB,mDAAK,qBAAqB,CAAC,CAAC;AACvF,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC;AAClF,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,yBAAyB;;IACvC,IACE,OAAO,aAAa,CAAC,OAAO,KAAK,WAAW;QAC5C,CAAA,MAAA,aAAa,CAAC,OAAO,CAAC,GAAG,0CAAE,6BAA6B,MAAK,MAAM,EACnE;QACA,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { Platform } from 'react-native';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { getExpoConstants, getExpoGo } from './expomodules';\nimport { ReactNativeLibraries } from './rnlibraries';\n\n/** Checks if the React Native Hermes engine is running */\nexport function isHermesEnabled(): boolean {\n return !!RN_GLOBAL_OBJ.HermesInternal;\n}\n\n/** Checks if the React Native TurboModules are enabled */\nexport function isTurboModuleEnabled(): boolean {\n return RN_GLOBAL_OBJ.__turboModuleProxy != null;\n}\n\n/** Checks if the React Native Fabric renderer is running */\nexport function isFabricEnabled(): boolean {\n return RN_GLOBAL_OBJ.nativeFabricUIManager != null;\n}\n\n/** Returns React Native Version as semver string */\nexport function getReactNativeVersion(): string | undefined {\n if (!ReactNativeLibraries.ReactNativeVersion) {\n return undefined;\n }\n const RNV = ReactNativeLibraries.ReactNativeVersion.version;\n return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;\n}\n\n/** Checks if Expo is present in the runtime */\nexport function isExpo(): boolean {\n return RN_GLOBAL_OBJ.expo != null;\n}\n\n/** Check if JS runs in Expo Go */\nexport function isExpoGo(): boolean {\n const expoGo = getExpoGo();\n return !!expoGo;\n}\n\n/** Check Expo Go version if available */\nexport function getExpoGoVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n return typeof expoConstants?.expoVersion === 'string' ? expoConstants.expoVersion : undefined;\n}\n\n/** Returns Expo SDK version if available */\nexport function getExpoSdkVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n const [, expoSdkVersion] =\n typeof expoConstants?.manifest?.runtimeVersion === 'string' ? expoConstants.manifest.runtimeVersion.split(':') : [];\n return expoSdkVersion;\n}\n\n/** Checks if the current platform is web */\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\n/** Checks if the current platform is not web */\nexport function notWeb(): boolean {\n return Platform.OS !== 'web';\n}\n\n/** Checks if the current platform is supported mobile platform (iOS or Android) */\nexport function isMobileOs(): boolean {\n return Platform.OS === 'ios' || Platform.OS === 'android';\n}\n\n/** Checks if the current platform is not supported mobile platform (iOS or Android) */\nexport function notMobileOs(): boolean {\n return !isMobileOs();\n}\n\n/** Returns Hermes Version if hermes is present in the runtime */\nexport function getHermesVersion(): string | undefined {\n return RN_GLOBAL_OBJ.HermesInternal?.getRuntimeProperties?.()['OSS Release Version'];\n}\n\n/** Returns default environment based on __DEV__ */\nexport function getDefaultEnvironment(): 'development' | 'production' {\n return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';\n}\n\n/** Check if SDK runs in Metro Dev Server side */\nexport function isRunningInMetroDevServer(): boolean {\n if (\n typeof RN_GLOBAL_OBJ.process !== 'undefined' &&\n RN_GLOBAL_OBJ.process.env?.___SENTRY_METRO_DEV_SERVER___ === 'true'\n ) {\n return true;\n }\n return false;\n}\n"]}
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/js/utils/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,0DAA0D;AAC1D,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC;AACxC,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,oBAAoB;IAClC,uLAAuL;IACvL,OAAO,aAAa,CAAC,aAAa,KAAK,IAAI,IAAI,aAAa,CAAC,kBAAkB,IAAI,IAAI,CAAC;AAC1F,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC,qBAAqB,IAAI,IAAI,CAAC;AACrD,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,qBAAqB;IACnC,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE;QAC5C,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,GAAG,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,OAAO,CAAC;IAC5D,OAAO,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACvG,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,MAAM;IACpB,OAAO,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC;AACpC,CAAC;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A,MAAA,aAAa,CAAC,cAAc,0CAAE,oBAAoB,mDAAK,qBAAqB,CAAC,CAAC;AACvF,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC;AAClF,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,yBAAyB;;IACvC,IACE,OAAO,aAAa,CAAC,OAAO,KAAK,WAAW;QAC5C,CAAA,MAAA,aAAa,CAAC,OAAO,CAAC,GAAG,0CAAE,6BAA6B,MAAK,MAAM,EACnE;QACA,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { Platform } from 'react-native';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { getExpoConstants, getExpoGo } from './expomodules';\nimport { ReactNativeLibraries } from './rnlibraries';\n\n/** Checks if the React Native Hermes engine is running */\nexport function isHermesEnabled(): boolean {\n return !!RN_GLOBAL_OBJ.HermesInternal;\n}\n\n/** Checks if the React Native TurboModules are enabled */\nexport function isTurboModuleEnabled(): boolean {\n // Reference: https://github.com/facebook/react-native/blob/641a79dc5137b69a3c0813413b9fb82d0b9df783/packages/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js#L110\n return RN_GLOBAL_OBJ.RN$Bridgeless === true || RN_GLOBAL_OBJ.__turboModuleProxy != null;\n}\n\n/** Checks if the React Native Fabric renderer is running */\nexport function isFabricEnabled(): boolean {\n return RN_GLOBAL_OBJ.nativeFabricUIManager != null;\n}\n\n/** Returns React Native Version as semver string */\nexport function getReactNativeVersion(): string | undefined {\n if (!ReactNativeLibraries.ReactNativeVersion) {\n return undefined;\n }\n const RNV = ReactNativeLibraries.ReactNativeVersion.version;\n return `${RNV.major}.${RNV.minor}.${RNV.patch}${RNV.prerelease != null ? `-${RNV.prerelease}` : ''}`;\n}\n\n/** Checks if Expo is present in the runtime */\nexport function isExpo(): boolean {\n return RN_GLOBAL_OBJ.expo != null;\n}\n\n/** Check if JS runs in Expo Go */\nexport function isExpoGo(): boolean {\n const expoGo = getExpoGo();\n return !!expoGo;\n}\n\n/** Check Expo Go version if available */\nexport function getExpoGoVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n return typeof expoConstants?.expoVersion === 'string' ? expoConstants.expoVersion : undefined;\n}\n\n/** Returns Expo SDK version if available */\nexport function getExpoSdkVersion(): string | undefined {\n const expoConstants = getExpoConstants();\n const [, expoSdkVersion] =\n typeof expoConstants?.manifest?.runtimeVersion === 'string' ? expoConstants.manifest.runtimeVersion.split(':') : [];\n return expoSdkVersion;\n}\n\n/** Checks if the current platform is web */\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\n/** Checks if the current platform is not web */\nexport function notWeb(): boolean {\n return Platform.OS !== 'web';\n}\n\n/** Checks if the current platform is supported mobile platform (iOS or Android) */\nexport function isMobileOs(): boolean {\n return Platform.OS === 'ios' || Platform.OS === 'android';\n}\n\n/** Checks if the current platform is not supported mobile platform (iOS or Android) */\nexport function notMobileOs(): boolean {\n return !isMobileOs();\n}\n\n/** Returns Hermes Version if hermes is present in the runtime */\nexport function getHermesVersion(): string | undefined {\n return RN_GLOBAL_OBJ.HermesInternal?.getRuntimeProperties?.()['OSS Release Version'];\n}\n\n/** Returns default environment based on __DEV__ */\nexport function getDefaultEnvironment(): 'development' | 'production' {\n return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';\n}\n\n/** Check if SDK runs in Metro Dev Server side */\nexport function isRunningInMetroDevServer(): boolean {\n if (\n typeof RN_GLOBAL_OBJ.process !== 'undefined' &&\n RN_GLOBAL_OBJ.process.env?.___SENTRY_METRO_DEV_SERVER___ === 'true'\n ) {\n return true;\n }\n return false;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { logger } from '@sentry/core';
1
+ import { debug } from '@sentry/core';
2
2
  /**
3
3
  * Returns callback factory wrapped with try/catch
4
4
  * or the original passed value is it's not a function.
@@ -13,7 +13,7 @@ export function safeFactory(danger, options = {}) {
13
13
  return danger(...args);
14
14
  }
15
15
  catch (error) {
16
- logger.error(options.loggerMessage ? options.loggerMessage : `The ${danger.name} callback threw an error`, error);
16
+ debug.error(options.loggerMessage ? options.loggerMessage : `The ${danger.name} callback threw an error`, error);
17
17
  return args[0];
18
18
  }
19
19
  };
@@ -32,7 +32,7 @@ export function safeTracesSampler(tracesSampler) {
32
32
  return tracesSampler(...args);
33
33
  }
34
34
  catch (error) {
35
- logger.error('The tracesSampler callback threw an error', error);
35
+ debug.error('The tracesSampler callback threw an error', error);
36
36
  return 0;
37
37
  }
38
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"safe.js","sourceRoot":"","sources":["../../../src/js/utils/safe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAOtC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,MAA+B,EAC/B,UAEI,EAAE;IAEN,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;QAChC,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE;YACjB,IAAI;gBACF,OAAO,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;aACxB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,CAAC,KAAK,CACV,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,0BAA0B,EAC5F,KAAK,CACN,CAAC;gBACF,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;aAChB;QACH,CAAC,CAAC;KACH;SAAM;QACL,OAAO,MAAM,CAAC;KACf;AACH,CAAC;AAID;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,aAAkD;IAElD,IAAI,aAAa,EAAE;QACjB,OAAO,CAAC,GAAG,IAA+B,EAA6B,EAAE;YACvE,IAAI;gBACF,OAAO,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;aAC/B;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;gBACjE,OAAO,CAAC,CAAC;aACV;QACH,CAAC,CAAC;KACH;SAAM;QACL,OAAO,aAAa,CAAC;KACtB;AACH,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport type { ReactNativeOptions } from '../options';\n\ntype DangerTypesWithoutCallSignature =\n // eslint-disable-next-line @typescript-eslint/ban-types\n Object | null | undefined;\n\n/**\n * Returns callback factory wrapped with try/catch\n * or the original passed value is it's not a function.\n *\n * If the factory fails original data are returned as it.\n * They might be partially modified by the failed function.\n */\nexport function safeFactory<A extends [R, ...unknown[]], R, T extends DangerTypesWithoutCallSignature>(\n danger: ((...args: A) => R) | T,\n options: {\n loggerMessage?: string;\n } = {},\n): ((...args: A) => R) | T {\n if (typeof danger === 'function') {\n return (...args) => {\n try {\n return danger(...args);\n } catch (error) {\n logger.error(\n options.loggerMessage ? options.loggerMessage : `The ${danger.name} callback threw an error`,\n error,\n );\n return args[0];\n }\n };\n } else {\n return danger;\n }\n}\n\ntype TracesSampler = Required<ReactNativeOptions>['tracesSampler'];\n\n/**\n * Returns sage tracesSampler that returns 0 if the original failed.\n */\nexport function safeTracesSampler(\n tracesSampler: ReactNativeOptions['tracesSampler'],\n): ReactNativeOptions['tracesSampler'] {\n if (tracesSampler) {\n return (...args: Parameters<TracesSampler>): ReturnType<TracesSampler> => {\n try {\n return tracesSampler(...args);\n } catch (error) {\n logger.error('The tracesSampler callback threw an error', error);\n return 0;\n }\n };\n } else {\n return tracesSampler;\n }\n}\n"]}
1
+ {"version":3,"file":"safe.js","sourceRoot":"","sources":["../../../src/js/utils/safe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAOrC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,MAA+B,EAC/B,UAEI,EAAE;IAEN,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;QAChC,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE;YACjB,IAAI;gBACF,OAAO,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;aACxB;YAAC,OAAO,KAAK,EAAE;gBACd,KAAK,CAAC,KAAK,CACT,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,0BAA0B,EAC5F,KAAK,CACN,CAAC;gBACF,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;aAChB;QACH,CAAC,CAAC;KACH;SAAM;QACL,OAAO,MAAM,CAAC;KACf;AACH,CAAC;AAID;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,aAAkD;IAElD,IAAI,aAAa,EAAE;QACjB,OAAO,CAAC,GAAG,IAA+B,EAA6B,EAAE;YACvE,IAAI;gBACF,OAAO,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;aAC/B;YAAC,OAAO,KAAK,EAAE;gBACd,KAAK,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;gBAChE,OAAO,CAAC,CAAC;aACV;QACH,CAAC,CAAC;KACH;SAAM;QACL,OAAO,aAAa,CAAC;KACtB;AACH,CAAC","sourcesContent":["import { debug } from '@sentry/core';\nimport type { ReactNativeOptions } from '../options';\n\ntype DangerTypesWithoutCallSignature =\n // eslint-disable-next-line @typescript-eslint/ban-types\n Object | null | undefined;\n\n/**\n * Returns callback factory wrapped with try/catch\n * or the original passed value is it's not a function.\n *\n * If the factory fails original data are returned as it.\n * They might be partially modified by the failed function.\n */\nexport function safeFactory<A extends [R, ...unknown[]], R, T extends DangerTypesWithoutCallSignature>(\n danger: ((...args: A) => R) | T,\n options: {\n loggerMessage?: string;\n } = {},\n): ((...args: A) => R) | T {\n if (typeof danger === 'function') {\n return (...args) => {\n try {\n return danger(...args);\n } catch (error) {\n debug.error(\n options.loggerMessage ? options.loggerMessage : `The ${danger.name} callback threw an error`,\n error,\n );\n return args[0];\n }\n };\n } else {\n return danger;\n }\n}\n\ntype TracesSampler = Required<ReactNativeOptions>['tracesSampler'];\n\n/**\n * Returns sage tracesSampler that returns 0 if the original failed.\n */\nexport function safeTracesSampler(\n tracesSampler: ReactNativeOptions['tracesSampler'],\n): ReactNativeOptions['tracesSampler'] {\n if (tracesSampler) {\n return (...args: Parameters<TracesSampler>): ReturnType<TracesSampler> => {\n try {\n return tracesSampler(...args);\n } catch (error) {\n debug.error('The tracesSampler callback threw an error', error);\n return 0;\n }\n };\n } else {\n return tracesSampler;\n }\n}\n"]}
@@ -18,6 +18,7 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
18
18
  };
19
19
  Promise: unknown;
20
20
  __turboModuleProxy: unknown;
21
+ RN$Bridgeless: unknown;
21
22
  nativeFabricUIManager: unknown;
22
23
  ErrorUtils?: ErrorUtils;
23
24
  expo?: ExpoGlobalObject;
@@ -1 +1 @@
1
- {"version":3,"file":"worldwide.d.ts","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,qCAAqC;IACpD,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,kFAAkF;AAClF,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,CA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;QACxE,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,KAAK,WAAW,GAAG;IACjB,QAAQ;QACN,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;KACpC,CAAC;CACH,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,aAAa,2BAA0C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgD1C,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAuC,CAAC","sourcesContent":["import type { InternalGlobal } from '@sentry/core';\nimport { GLOBAL_OBJ } from '@sentry/core';\nimport type { ErrorUtils } from 'react-native/types';\nimport type { ExpoGlobalObject } from './expoglobalobject';\n\nexport interface HermesPromiseRejectionTrackingOptions {\n allRejections: boolean;\n onUnhandled: (id: string, error: unknown) => void;\n onHandled: (id: string) => void;\n}\n\n/** Internal Global object interface with common and Sentry specific properties */\nexport interface ReactNativeInternalGlobal extends InternalGlobal {\n __sentry_rn_v4_registered?: boolean;\n __sentry_rn_v5_registered?: boolean;\n HermesInternal?: {\n getRuntimeProperties?: () => Record<string, string | undefined>;\n enablePromiseRejectionTracker?: (options: HermesPromiseRejectionTrackingOptions) => void;\n hasPromise?: () => boolean;\n };\n Promise: unknown;\n __turboModuleProxy: unknown;\n nativeFabricUIManager: unknown;\n ErrorUtils?: ErrorUtils;\n expo?: ExpoGlobalObject;\n XMLHttpRequest?: typeof XMLHttpRequest;\n process?: {\n env?: {\n ___SENTRY_METRO_DEV_SERVER___?: string;\n };\n };\n __BUNDLE_START_TIME__?: number;\n nativePerformanceNow?: () => number;\n TextEncoder?: TextEncoder;\n alert?: (message: string) => void;\n SENTRY_RELEASE?: {\n /** Used by Sentry Webpack Plugin, not used by RN, only to silence TS */\n id?: string;\n name?: string;\n version?: string;\n };\n}\n\ntype TextEncoder = {\n new (): {\n encode(input?: string): Uint8Array;\n };\n};\n\n/** Get's the global object for the current JavaScript runtime */\nexport const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal;\n"]}
1
+ {"version":3,"file":"worldwide.js","sourceRoot":"","sources":["../../../src/js/utils/worldwide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiD1C,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAuC,CAAC","sourcesContent":["import type { InternalGlobal } from '@sentry/core';\nimport { GLOBAL_OBJ } from '@sentry/core';\nimport type { ErrorUtils } from 'react-native/types';\nimport type { ExpoGlobalObject } from './expoglobalobject';\n\nexport interface HermesPromiseRejectionTrackingOptions {\n allRejections: boolean;\n onUnhandled: (id: string, error: unknown) => void;\n onHandled: (id: string) => void;\n}\n\n/** Internal Global object interface with common and Sentry specific properties */\nexport interface ReactNativeInternalGlobal extends InternalGlobal {\n __sentry_rn_v4_registered?: boolean;\n __sentry_rn_v5_registered?: boolean;\n HermesInternal?: {\n getRuntimeProperties?: () => Record<string, string | undefined>;\n enablePromiseRejectionTracker?: (options: HermesPromiseRejectionTrackingOptions) => void;\n hasPromise?: () => boolean;\n };\n Promise: unknown;\n __turboModuleProxy: unknown;\n RN$Bridgeless: unknown;\n nativeFabricUIManager: unknown;\n ErrorUtils?: ErrorUtils;\n expo?: ExpoGlobalObject;\n XMLHttpRequest?: typeof XMLHttpRequest;\n process?: {\n env?: {\n ___SENTRY_METRO_DEV_SERVER___?: string;\n };\n };\n __BUNDLE_START_TIME__?: number;\n nativePerformanceNow?: () => number;\n TextEncoder?: TextEncoder;\n alert?: (message: string) => void;\n SENTRY_RELEASE?: {\n /** Used by Sentry Webpack Plugin, not used by RN, only to silence TS */\n id?: string;\n name?: string;\n version?: string;\n };\n}\n\ntype TextEncoder = {\n new (): {\n encode(input?: string): Uint8Array;\n };\n};\n\n/** Get's the global object for the current JavaScript runtime */\nexport const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal;\n"]}
@@ -1,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "7.0.0-rc.1";
3
+ export declare const SDK_VERSION = "7.0.0";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,eAAe,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';
2
2
  export const SDK_NAME = 'sentry.javascript.react-native';
3
- export const SDK_VERSION = '7.0.0-rc.1';
3
+ export const SDK_VERSION = '7.0.0';
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '7.0.0-rc.1';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '7.0.0';\n"]}
@@ -45,6 +45,7 @@ interface SentryNativeWrapper {
45
45
  captureScreenshot(): Promise<Screenshot[] | null>;
46
46
  fetchNativeRelease(): PromiseLike<NativeReleaseResponse>;
47
47
  fetchNativeDeviceContexts(): PromiseLike<NativeDeviceContextsResponse | null>;
48
+ fetchNativeLogAttributes(): Promise<NativeDeviceContextsResponse | null>;
48
49
  fetchNativeAppStart(): PromiseLike<NativeAppStartResponse | null>;
49
50
  fetchNativeFrames(): PromiseLike<NativeFramesResponse | null>;
50
51
  fetchNativeSdkInfo(): PromiseLike<Package | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/js/wrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,SAAS,EACT,aAAa,EACb,IAAI,EACL,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EAErB,iBAAiB,EACjB,IAAI,EACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,MAAM,oBAAoB,CAAC;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;OAEG;IACH,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,EAAE,GAAG,iBAAiB,GAAG,IAAI,CAAC;IAC/E,yCAAyC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5D,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAAC;IAEpC,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC1C,yBAAyB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAEhE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACxD,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;IAErE,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEzD,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9C;AAID;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,mBA0uBpB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAE5E"}
@@ -18,7 +18,7 @@ var __rest = (this && this.__rest) || function (s, e) {
18
18
  }
19
19
  return t;
20
20
  };
21
- import { logger, normalize, SentryError } from '@sentry/core';
21
+ import { debug, normalize, SentryError } from '@sentry/core';
22
22
  import { NativeModules, Platform } from 'react-native';
23
23
  import { isHardCrash } from './misc';
24
24
  import { encodeUTF8 } from './utils/encode';
@@ -63,7 +63,7 @@ export const NATIVE = {
63
63
  sendEnvelope(envelope) {
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  if (!this.enableNative) {
66
- logger.warn('Event was skipped as native SDK is not enabled.');
66
+ debug.warn('Event was skipped as native SDK is not enabled.');
67
67
  return;
68
68
  }
69
69
  if (!this._isModuleLoaded(RNSentry)) {
@@ -122,20 +122,20 @@ export const NATIVE = {
122
122
  const options = Object.assign({ enableNative: true, autoInitializeNativeSdk: true }, originalOptions);
123
123
  if (!options.enableNative) {
124
124
  if (options.enableNativeNagger) {
125
- logger.warn('Note: Native Sentry SDK is disabled.');
125
+ debug.warn('Note: Native Sentry SDK is disabled.');
126
126
  }
127
127
  this.enableNative = false;
128
128
  return false;
129
129
  }
130
130
  if (!options.autoInitializeNativeSdk) {
131
131
  if (options.enableNativeNagger) {
132
- logger.warn('Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false');
132
+ debug.warn('Note: Native Sentry SDK was not initialized automatically, you will need to initialize it manually. If you wish to disable the native SDK and get rid of this warning, pass enableNative: false');
133
133
  }
134
134
  this.enableNative = true;
135
135
  return false;
136
136
  }
137
137
  if (!options.dsn) {
138
- logger.warn('Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.');
138
+ debug.warn('Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.');
139
139
  this.enableNative = false;
140
140
  return false;
141
141
  }
@@ -160,6 +160,20 @@ export const NATIVE = {
160
160
  return nativeIsReady;
161
161
  });
162
162
  },
163
+ /**
164
+ * Fetches the attributes to be set into logs from Native
165
+ */
166
+ fetchNativeLogAttributes() {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ if (!this.enableNative) {
169
+ throw this._DisabledNativeError;
170
+ }
171
+ if (!this._isModuleLoaded(RNSentry)) {
172
+ throw this._NativeClientError;
173
+ }
174
+ return RNSentry.fetchNativeLogAttributes();
175
+ });
176
+ },
163
177
  /**
164
178
  * Fetches the release from native
165
179
  */
@@ -205,11 +219,11 @@ export const NATIVE = {
205
219
  fetchNativeAppStart() {
206
220
  return __awaiter(this, void 0, void 0, function* () {
207
221
  if (!this.enableNative) {
208
- logger.warn(this._DisabledNativeError);
222
+ debug.warn(this._DisabledNativeError);
209
223
  return null;
210
224
  }
211
225
  if (!this._isModuleLoaded(RNSentry)) {
212
- logger.error(this._NativeClientError);
226
+ debug.error(this._NativeClientError);
213
227
  return null;
214
228
  }
215
229
  return RNSentry.fetchNativeAppStart();
@@ -308,7 +322,7 @@ export const NATIVE = {
308
322
  stringifiedExtra = JSON.stringify(normalizedExtra);
309
323
  }
310
324
  catch (e) {
311
- logger.error('Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values', e);
325
+ debug.error('Extra for key ${key} not passed to native SDK, because it contains non-stringifiable values', e);
312
326
  }
313
327
  if (typeof stringifiedExtra === 'string') {
314
328
  return RNSentry.setExtra(key, stringifiedExtra);
@@ -363,7 +377,7 @@ export const NATIVE = {
363
377
  normalizedContext = convertToNormalizedObject(context);
364
378
  }
365
379
  catch (e) {
366
- logger.error('Context for key ${key} not passed to native SDK, because it contains non-serializable values', e);
380
+ debug.error('Context for key ${key} not passed to native SDK, because it contains non-serializable values', e);
367
381
  }
368
382
  if (normalizedContext) {
369
383
  RNSentry.setContext(key, normalizedContext);
@@ -412,11 +426,11 @@ export const NATIVE = {
412
426
  captureScreenshot() {
413
427
  return __awaiter(this, void 0, void 0, function* () {
414
428
  if (!this.enableNative) {
415
- logger.warn(this._DisabledNativeError);
429
+ debug.warn(this._DisabledNativeError);
416
430
  return null;
417
431
  }
418
432
  if (!this._isModuleLoaded(RNSentry)) {
419
- logger.error(this._NativeClientError);
433
+ debug.error(this._NativeClientError);
420
434
  return null;
421
435
  }
422
436
  let raw;
@@ -424,7 +438,7 @@ export const NATIVE = {
424
438
  raw = yield RNSentry.captureScreenshot();
425
439
  }
426
440
  catch (e) {
427
- logger.warn('Failed to capture screenshot', e);
441
+ debug.warn('Failed to capture screenshot', e);
428
442
  }
429
443
  if (raw) {
430
444
  return raw.map((item) => (Object.assign(Object.assign({}, item), { data: new Uint8Array(item.data) })));
@@ -455,10 +469,10 @@ export const NATIVE = {
455
469
  }
456
470
  const { started, error } = RNSentry.startProfiling(platformProfilers);
457
471
  if (started) {
458
- logger.log('[NATIVE] Start Profiling');
472
+ debug.log('[NATIVE] Start Profiling');
459
473
  }
460
474
  else {
461
- logger.error('[NATIVE] Start Profiling Failed', error);
475
+ debug.error('[NATIVE] Start Profiling Failed', error);
462
476
  }
463
477
  return !!started;
464
478
  },
@@ -471,14 +485,14 @@ export const NATIVE = {
471
485
  }
472
486
  const { profile, nativeProfile, androidProfile, error } = RNSentry.stopProfiling();
473
487
  if (!profile || error) {
474
- logger.error('[NATIVE] Stop Profiling Failed', error);
488
+ debug.error('[NATIVE] Stop Profiling Failed', error);
475
489
  return null;
476
490
  }
477
491
  if (Platform.OS === 'ios' && !nativeProfile) {
478
- logger.warn('[NATIVE] Stop Profiling Failed: No Native Profile');
492
+ debug.warn('[NATIVE] Stop Profiling Failed: No Native Profile');
479
493
  }
480
494
  if (Platform.OS === 'android' && !androidProfile) {
481
- logger.warn('[NATIVE] Stop Profiling Failed: No Android Profile');
495
+ debug.warn('[NATIVE] Stop Profiling Failed: No Android Profile');
482
496
  }
483
497
  try {
484
498
  return {
@@ -488,7 +502,7 @@ export const NATIVE = {
488
502
  };
489
503
  }
490
504
  catch (e) {
491
- logger.error('[NATIVE] Failed to parse Hermes Profile JSON', e);
505
+ debug.error('[NATIVE] Failed to parse Hermes Profile JSON', e);
492
506
  return null;
493
507
  }
494
508
  },
@@ -524,11 +538,11 @@ export const NATIVE = {
524
538
  captureReplay(isHardCrash) {
525
539
  return __awaiter(this, void 0, void 0, function* () {
526
540
  if (!this.enableNative) {
527
- logger.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is disabled.`);
541
+ debug.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is disabled.`);
528
542
  return Promise.resolve(null);
529
543
  }
530
544
  if (!this._isModuleLoaded(RNSentry)) {
531
- logger.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is not available.`);
545
+ debug.warn(`[NATIVE] \`${this.captureReplay.name}\` is not available when native is not available.`);
532
546
  return Promise.resolve(null);
533
547
  }
534
548
  return (yield RNSentry.captureReplay(isHardCrash)) || null;
@@ -536,11 +550,11 @@ export const NATIVE = {
536
550
  },
537
551
  getCurrentReplayId() {
538
552
  if (!this.enableNative) {
539
- logger.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`);
553
+ debug.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is disabled.`);
540
554
  return null;
541
555
  }
542
556
  if (!this._isModuleLoaded(RNSentry)) {
543
- logger.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`);
557
+ debug.warn(`[NATIVE] \`${this.getCurrentReplayId.name}\` is not available when native is not available.`);
544
558
  return null;
545
559
  }
546
560
  return RNSentry.getCurrentReplayId() || null;
@@ -573,7 +587,7 @@ export const NATIVE = {
573
587
  return new Uint8Array(data);
574
588
  }
575
589
  catch (error) {
576
- logger.error('Error:', error);
590
+ debug.error('Error:', error);
577
591
  return null;
578
592
  }
579
593
  });
@@ -586,7 +600,7 @@ export const NATIVE = {
586
600
  return RNSentry.popTimeToDisplayFor(key);
587
601
  }
588
602
  catch (error) {
589
- logger.error('Error:', error);
603
+ debug.error('Error:', error);
590
604
  return Promise.resolve(null);
591
605
  }
592
606
  },
@@ -598,7 +612,7 @@ export const NATIVE = {
598
612
  RNSentry.setActiveSpanId(spanId);
599
613
  }
600
614
  catch (error) {
601
- logger.error('Error:', error);
615
+ debug.error('Error:', error);
602
616
  return undefined;
603
617
  }
604
618
  },
@@ -613,7 +627,7 @@ export const NATIVE = {
613
627
  return base64 || null;
614
628
  }
615
629
  catch (error) {
616
- logger.error('Error:', error);
630
+ debug.error('Error:', error);
617
631
  return Promise.resolve(null);
618
632
  }
619
633
  });