@sentry/react-native 5.0.0-alpha.9 → 5.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -3
- package/README.md +1 -1
- package/RNSentry.podspec +5 -5
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +133 -21
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/dist/js/NativeRNSentry.d.ts +37 -3
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/breadcrumb.d.ts +11 -0
- package/dist/js/breadcrumb.d.ts.map +1 -0
- package/dist/js/breadcrumb.js +34 -0
- package/dist/js/breadcrumb.js.map +1 -0
- package/dist/js/client.d.ts +8 -5
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +36 -35
- package/dist/js/client.js.map +1 -1
- package/dist/js/index.d.ts +1 -0
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +1 -0
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/devicecontext.d.ts +2 -2
- package/dist/js/integrations/devicecontext.d.ts.map +1 -1
- package/dist/js/integrations/devicecontext.js +45 -11
- package/dist/js/integrations/devicecontext.js.map +1 -1
- package/dist/js/integrations/eventorigin.d.ts +1 -1
- package/dist/js/integrations/eventorigin.d.ts.map +1 -1
- package/dist/js/integrations/eventorigin.js.map +1 -1
- package/dist/js/integrations/factory.d.ts +7 -0
- package/dist/js/integrations/factory.d.ts.map +1 -0
- package/dist/js/integrations/factory.js +11 -0
- package/dist/js/integrations/factory.js.map +1 -0
- package/dist/js/integrations/modulesloader.d.ts +1 -1
- package/dist/js/integrations/modulesloader.d.ts.map +1 -1
- package/dist/js/integrations/modulesloader.js +8 -2
- package/dist/js/integrations/modulesloader.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +4 -3
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/reactnativeinfo.d.ts +1 -1
- package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeinfo.js.map +1 -1
- package/dist/js/integrations/release.d.ts +1 -1
- package/dist/js/integrations/release.d.ts.map +1 -1
- package/dist/js/integrations/release.js.map +1 -1
- package/dist/js/integrations/screenshot.d.ts +23 -0
- package/dist/js/integrations/screenshot.d.ts.map +1 -0
- package/dist/js/integrations/screenshot.js +39 -0
- package/dist/js/integrations/screenshot.js.map +1 -0
- package/dist/js/integrations/sdkinfo.d.ts +1 -1
- package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/integrations/viewhierarchy.d.ts +20 -0
- package/dist/js/integrations/viewhierarchy.d.ts.map +1 -0
- package/dist/js/integrations/viewhierarchy.js +50 -0
- package/dist/js/integrations/viewhierarchy.js.map +1 -0
- package/dist/js/measurements.d.ts +4 -0
- package/dist/js/measurements.d.ts.map +1 -1
- package/dist/js/measurements.js +11 -0
- package/dist/js/measurements.js.map +1 -1
- package/dist/js/misc.d.ts +1 -1
- package/dist/js/misc.d.ts.map +1 -1
- package/dist/js/misc.js.map +1 -1
- package/dist/js/options.d.ts +24 -11
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/scope.d.ts +1 -1
- package/dist/js/scope.d.ts.map +1 -1
- package/dist/js/scope.js +4 -2
- package/dist/js/scope.js.map +1 -1
- package/dist/js/sdk.d.ts +4 -3
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +15 -6
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/tools/ModulesCollector.d.ts +10 -1
- package/dist/js/tools/ModulesCollector.d.ts.map +1 -1
- package/dist/js/tools/ModulesCollector.js +51 -1
- package/dist/js/tools/ModulesCollector.js.map +1 -1
- package/dist/js/tools/collectModules.js +6 -27
- package/dist/js/tools/collectModules.js.map +1 -1
- package/dist/js/touchevents.d.ts +9 -0
- package/dist/js/touchevents.d.ts.map +1 -1
- package/dist/js/touchevents.js +23 -6
- package/dist/js/touchevents.js.map +1 -1
- package/dist/js/tracing/nativeframes.d.ts +2 -2
- package/dist/js/tracing/nativeframes.d.ts.map +1 -1
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/tracing/reactnativenavigation.d.ts +5 -3
- package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnativenavigation.js +2 -1
- package/dist/js/tracing/reactnativenavigation.js.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.d.ts +1 -0
- package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.js +7 -0
- package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts +5 -5
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +1 -1
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/reactnavigation.d.ts +4 -2
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js +2 -1
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/reactnavigationv4.d.ts +5 -3
- package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigationv4.js +2 -1
- package/dist/js/tracing/reactnavigationv4.js.map +1 -1
- package/dist/js/tracing/routingInstrumentation.d.ts +8 -3
- package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
- package/dist/js/tracing/routingInstrumentation.js +3 -0
- package/dist/js/tracing/routingInstrumentation.js.map +1 -1
- package/dist/js/tracing/stalltracking.d.ts +2 -2
- package/dist/js/tracing/stalltracking.d.ts.map +1 -1
- package/dist/js/tracing/stalltracking.js.map +1 -1
- package/dist/js/tracing/types.d.ts +1 -1
- package/dist/js/tracing/types.d.ts.map +1 -1
- package/dist/js/tracing/types.js.map +1 -1
- package/dist/js/tracing/utils.d.ts +2 -2
- package/dist/js/tracing/utils.d.ts.map +1 -1
- package/dist/js/tracing/utils.js.map +1 -1
- package/dist/js/transports/TextEncoder.d.ts +1 -1
- package/dist/js/transports/TextEncoder.d.ts.map +1 -1
- package/dist/js/transports/TextEncoder.js.map +1 -1
- package/dist/js/transports/native.d.ts +7 -3
- package/dist/js/transports/native.d.ts.map +1 -1
- package/dist/js/transports/native.js +10 -1
- package/dist/js/transports/native.js.map +1 -1
- package/dist/js/user.d.ts +1 -1
- package/dist/js/user.d.ts.map +1 -1
- package/dist/js/user.js.map +1 -1
- package/dist/js/utils/envelope.d.ts +1 -1
- package/dist/js/utils/envelope.d.ts.map +1 -1
- package/dist/js/utils/envelope.js.map +1 -1
- package/dist/js/utils/ignorerequirecyclelogs.d.ts +6 -0
- package/dist/js/utils/ignorerequirecyclelogs.d.ts.map +1 -0
- package/dist/js/utils/ignorerequirecyclelogs.js +15 -0
- package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -0
- package/dist/js/utils/outcome.d.ts +1 -1
- package/dist/js/utils/outcome.d.ts.map +1 -1
- package/dist/js/utils/outcome.js.map +1 -1
- package/dist/js/utils/safe.d.ts +1 -1
- package/dist/js/utils/safe.d.ts.map +1 -1
- package/dist/js/utils/safe.js.map +1 -1
- package/dist/js/utils/worldwide.d.ts +1 -1
- package/dist/js/utils/worldwide.d.ts.map +1 -1
- package/dist/js/utils/worldwide.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.d.ts.map +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +10 -3
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +42 -6
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.h +5 -0
- package/ios/RNSentry.mm +94 -49
- package/package.json +24 -23
- package/sample-new-architecture/react-native.config.js +3 -1
- package/scripts/collect-modules.sh +12 -1
- package/sentry.gradle +46 -15
- package/src/js/NativeRNSentry.ts +39 -3
- package/ios/RNSentry.xcodeproj/project.pbxproj +0 -472
- package/ios/RNSentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/RNSentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,155 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.0.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Add View Hierarchy to the crashed/errored events ([#2708](https://github.com/getsentry/sentry-react-native/pull/2708))
|
|
8
|
+
- Collect modules script for XCode builds supports NODE_BINARY to set path to node executable ([#2805](https://github.com/getsentry/sentry-react-native/pull/2805))
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
- Bump Android SDK from v6.12.1 to v6.13.1 ([#2790](https://github.com/getsentry/sentry-react-native/pull/2790), [#2809](https://github.com/getsentry/sentry-react-native/pull/2809))
|
|
13
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6131)
|
|
14
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.13.1)
|
|
15
|
+
- Bump Sample React Native from v0.71.0 to v0.71.1 ([#2767](https://github.com/getsentry/sentry-react-native/pull/2767))
|
|
16
|
+
- [changelog](https://github.com/facebook/react-native/blob/main/CHANGELOG.md#v0711)
|
|
17
|
+
- [diff](https://github.com/facebook/react-native/compare/v0.71.0...v0.71.1)
|
|
18
|
+
- Bump JavaScript SDK from v7.32.1 to v7.36.0 ([#2785](https://github.com/getsentry/sentry-react-native/pull/2785), [#2799](https://github.com/getsentry/sentry-react-native/pull/2799))
|
|
19
|
+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7360)
|
|
20
|
+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.32.1...7.36.0)
|
|
21
|
+
|
|
22
|
+
## 5.0.0-beta.1
|
|
23
|
+
|
|
24
|
+
- Latest changes from 4.14.0
|
|
25
|
+
|
|
26
|
+
### Breaking changes
|
|
27
|
+
|
|
28
|
+
- Option `enableAutoPerformanceTracking` renamed to `enableAutoPerformanceTracing`
|
|
29
|
+
- Option `enableOutOfMemoryTracking` renamed to `enableWatchdogTerminationTracking`
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
- Sync `tags`, `extra`, `fingerprint`, `level`, `environment` and `breadcrumbs` from `sentry-cocoa` during event processing. ([#2713](https://github.com/getsentry/sentry-react-native/pull/2713))
|
|
34
|
+
- `breadcrumb.level` value `log` is transformed to `debug` when syncing with native layers.
|
|
35
|
+
- Remove `breadcrumb.level` value `critical` transformation to `fatal`.
|
|
36
|
+
- Default `breadcrumb.level` is `info`
|
|
37
|
+
|
|
38
|
+
### Dependencies
|
|
39
|
+
|
|
40
|
+
- Bump Cocoa SDK from v7.31.5 to v8.0.0 ([#2756](https://github.com/getsentry/sentry-react-native/pull/2756))
|
|
41
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#800)
|
|
42
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.31.5...8.0.0)
|
|
43
|
+
- Bump Android SDK from v6.12.1 to v6.13.0 ([#2790](https://github.com/getsentry/sentry-react-native/pull/2790))
|
|
44
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6130)
|
|
45
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.12.1...6.13.0)
|
|
46
|
+
|
|
47
|
+
## 4.14.0
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
- Add support for RNGP introduced in React Native 0.71.0 ([#2759](https://github.com/getsentry/sentry-react-native/pull/2759))
|
|
52
|
+
|
|
53
|
+
### Fixes
|
|
54
|
+
|
|
55
|
+
- Take screenshot runs on UI thread on Android ([#2743](https://github.com/getsentry/sentry-react-native/pull/2743))
|
|
56
|
+
|
|
57
|
+
### Dependencies
|
|
58
|
+
|
|
59
|
+
- Bump Android SDK from v6.11.0 to v6.12.1 ([#2755](https://github.com/getsentry/sentry-react-native/pull/2755))
|
|
60
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6121)
|
|
61
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.11.0...6.12.1)
|
|
62
|
+
- Bump JavaScript SDK from v7.29.0 to v7.32.1 ([#2738](https://github.com/getsentry/sentry-react-native/pull/2738), [#2777](https://github.com/getsentry/sentry-react-native/pull/2777))
|
|
63
|
+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7321)
|
|
64
|
+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.29.0...7.32.1)
|
|
65
|
+
|
|
66
|
+
## 5.0.0-alpha.11
|
|
67
|
+
|
|
68
|
+
- Latest changes from 4.13.0
|
|
69
|
+
|
|
70
|
+
### Breaking changes
|
|
71
|
+
|
|
72
|
+
- Message event current stack trace moved from exception to threads ([#2694](https://github.com/getsentry/sentry-react-native/pull/2694))
|
|
73
|
+
- `touchEventBoundaryProps.labelName` property instead of default `accessibilityLabel` fallback ([#2712](https://github.com/getsentry/sentry-react-native/pull/2712))
|
|
74
|
+
|
|
75
|
+
### Fixes
|
|
76
|
+
|
|
77
|
+
- Unreachable fallback to fetch transport if native is not available ([#2695](https://github.com/getsentry/sentry-react-native/pull/2695))
|
|
78
|
+
|
|
79
|
+
## 4.13.0
|
|
80
|
+
|
|
81
|
+
### Fixes
|
|
82
|
+
|
|
83
|
+
- Missing `originalException` in `beforeSend` for events from react native error handler ([#2706](https://github.com/getsentry/sentry-react-native/pull/2706))
|
|
84
|
+
- ModulesLoader integration returns original event if native is not available and event modules overwrite native modules ([#2730](https://github.com/getsentry/sentry-react-native/pull/2730))
|
|
85
|
+
|
|
86
|
+
### Dependencies
|
|
87
|
+
|
|
88
|
+
- Bump Cocoa SDK from v7.31.3 to v7.31.5 ([#2699](https://github.com/getsentry/sentry-react-native/pull/2699), [#2714](https://github.com/getsentry/sentry-react-native/pull/2714))
|
|
89
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/8.0.0/CHANGELOG.md#7315)
|
|
90
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.31.3...7.31.5)
|
|
91
|
+
- Bump JavaScript SDK from v7.26.0 to v7.29.0 ([#2705](https://github.com/getsentry/sentry-react-native/pull/2705), [#2709](https://github.com/getsentry/sentry-react-native/pull/2709), [#2715](https://github.com/getsentry/sentry-react-native/pull/2715), [#2736](https://github.com/getsentry/sentry-react-native/pull/2736))
|
|
92
|
+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7290)
|
|
93
|
+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.26.0...7.29.0)
|
|
94
|
+
- Bump Android SDK from v6.9.2 to v6.11.0 ([#2704](https://github.com/getsentry/sentry-react-native/pull/2704), [#2724](https://github.com/getsentry/sentry-react-native/pull/2724))
|
|
95
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6110)
|
|
96
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.9.2...6.11.0)
|
|
97
|
+
|
|
98
|
+
## 4.12.0
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
- Add `lastEventId` method to the API ([#2675](https://github.com/getsentry/sentry-react-native/pull/2675))
|
|
103
|
+
|
|
104
|
+
### Fix
|
|
105
|
+
|
|
106
|
+
- `Sentry.startTransaction` doesn't require `op` ([#2691](https://github.com/getsentry/sentry-react-native/pull/2691))
|
|
107
|
+
|
|
108
|
+
### Dependencies
|
|
109
|
+
|
|
110
|
+
- Bump Cocoa SDK from v7.31.2 to v7.31.3 ([#2647](https://github.com/getsentry/sentry-react-native/pull/2647))
|
|
111
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/8.0.0/CHANGELOG.md#7313)
|
|
112
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.31.2...7.31.3)
|
|
113
|
+
- Bump JavaScript SDK from v7.21.1 to v7.26.0 ([#2672](https://github.com/getsentry/sentry-react-native/pull/2672), [#2648](https://github.com/getsentry/sentry-react-native/pull/2648), [#2692](https://github.com/getsentry/sentry-react-native/pull/2692))
|
|
114
|
+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7260)
|
|
115
|
+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.21.1...7.26.0)
|
|
116
|
+
- Bump Android SDK from v6.9.1 to v6.9.2 ([#2677](https://github.com/getsentry/sentry-react-native/pull/2677))
|
|
117
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#692)
|
|
118
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.9.1...6.9.2)
|
|
119
|
+
|
|
120
|
+
## 5.0.0-alpha.10
|
|
121
|
+
|
|
122
|
+
- Latest changes from 4.11.0
|
|
123
|
+
|
|
124
|
+
### Dependencies
|
|
125
|
+
|
|
126
|
+
- Bump CLI from v1.74.4 to v2.10.0 ([#2669](https://github.com/getsentry/sentry-react-native/pull/2669))
|
|
127
|
+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2100)
|
|
128
|
+
- [diff](https://github.com/getsentry/sentry-cli/compare/1.74.4...2.10.0)
|
|
129
|
+
|
|
130
|
+
## 4.11.0
|
|
131
|
+
|
|
132
|
+
### Features
|
|
133
|
+
|
|
134
|
+
- Screenshots ([#2610](https://github.com/getsentry/sentry-react-native/pull/2610))
|
|
135
|
+
|
|
136
|
+
## 4.10.1
|
|
137
|
+
|
|
138
|
+
### Fixes
|
|
139
|
+
|
|
140
|
+
- Bump Wizard from v1.2.17 to v1.4.0 ([#2645](https://github.com/getsentry/sentry-react-native/pull/2645))
|
|
141
|
+
- [changelog](https://github.com/getsentry/sentry-wizard/blob/master/CHANGELOG.md#140)
|
|
142
|
+
- [diff](https://github.com/getsentry/sentry-wizard/compare/v1.2.17...v1.4.0)
|
|
143
|
+
- Android builds without ext config, auto create assets dir for modules ([#2652](https://github.com/getsentry/sentry-react-native/pull/2652))
|
|
144
|
+
- Exit gracefully if source map file for collecting modules doesn't exist ([#2655](https://github.com/getsentry/sentry-react-native/pull/2655))
|
|
145
|
+
- Create only one clean-up tasks for modules collection ([#2657](https://github.com/getsentry/sentry-react-native/pull/2657))
|
|
146
|
+
|
|
147
|
+
### Dependencies
|
|
148
|
+
|
|
149
|
+
- Bump Android SDK from v6.8.0 to v6.9.1 ([#2653](https://github.com/getsentry/sentry-react-native/pull/2653))
|
|
150
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#691)
|
|
151
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.8.0...6.9.1)
|
|
152
|
+
|
|
3
153
|
## 5.0.0-alpha.9
|
|
4
154
|
|
|
5
155
|
- Latest changes from 4.10.0
|
|
@@ -1007,10 +1157,10 @@ This release is a breaking change an code changes are necessary.
|
|
|
1007
1157
|
New way to import and init the SDK:
|
|
1008
1158
|
|
|
1009
1159
|
```js
|
|
1010
|
-
import * as Sentry from
|
|
1160
|
+
import * as Sentry from '@sentry/react-native';
|
|
1011
1161
|
|
|
1012
1162
|
Sentry.init({
|
|
1013
|
-
dsn:
|
|
1163
|
+
dsn: 'DSN',
|
|
1014
1164
|
});
|
|
1015
1165
|
```
|
|
1016
1166
|
|
|
@@ -1245,7 +1395,7 @@ We decided to deactivate stack trace merging by default on iOS since it seems to
|
|
|
1245
1395
|
To activate it set:
|
|
1246
1396
|
|
|
1247
1397
|
```js
|
|
1248
|
-
Sentry.config(
|
|
1398
|
+
Sentry.config('___DSN___', {
|
|
1249
1399
|
deactivateStacktraceMerging: false,
|
|
1250
1400
|
});
|
|
1251
1401
|
```
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to he
|
|
|
13
13
|
# Sentry SDK for React Native
|
|
14
14
|
|
|
15
15
|
[](https://github.com/getsentry/sentry-react-native/actions/workflows/buildandtest.yml)
|
|
16
|
-
[](https://github.com/getsentry/sentry-react-native/actions?query=workflow%3A"End-to-End%20Tests")
|
|
17
17
|
[](https://www.npmjs.com/package/@sentry/react-native)
|
|
18
18
|
[](https://www.npmjs.com/package/@sentry/react-native)
|
|
19
19
|
[](https://www.npmjs.com/package/@sentry/react-native)
|
package/RNSentry.podspec
CHANGED
|
@@ -12,16 +12,16 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
s.homepage = "https://github.com/getsentry/sentry-react-native"
|
|
13
13
|
s.source = { :git => 'https://github.com/getsentry/sentry-react-native.git', :tag => "#{s.version}"}
|
|
14
14
|
|
|
15
|
-
s.ios.deployment_target = "
|
|
16
|
-
s.osx.deployment_target = "10.
|
|
17
|
-
s.tvos.deployment_target = "
|
|
15
|
+
s.ios.deployment_target = "11.0"
|
|
16
|
+
s.osx.deployment_target = "10.13"
|
|
17
|
+
s.tvos.deployment_target = "11.0"
|
|
18
18
|
|
|
19
19
|
s.preserve_paths = '*.js'
|
|
20
20
|
|
|
21
21
|
s.dependency 'React-Core'
|
|
22
|
-
s.dependency 'Sentry/HybridSDK', '
|
|
22
|
+
s.dependency 'Sentry/HybridSDK', '8.0.0'
|
|
23
23
|
|
|
24
|
-
s.source_files = 'ios
|
|
24
|
+
s.source_files = 'ios/**/*.{h,mm}'
|
|
25
25
|
s.public_header_files = 'ios/RNSentry.h'
|
|
26
26
|
|
|
27
27
|
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
|
package/android/build.gradle
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
package io.sentry.react;
|
|
2
2
|
|
|
3
|
+
import static io.sentry.android.core.internal.util.ScreenshotUtils.takeScreenshot;
|
|
4
|
+
|
|
3
5
|
import android.app.Activity;
|
|
4
6
|
import android.content.Context;
|
|
5
7
|
import android.content.pm.PackageInfo;
|
|
@@ -16,7 +18,11 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
|
|
16
18
|
import com.facebook.react.bridge.ReadableArray;
|
|
17
19
|
import com.facebook.react.bridge.ReadableMap;
|
|
18
20
|
import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
|
21
|
+
import com.facebook.react.bridge.UiThreadUtil;
|
|
22
|
+
import com.facebook.react.bridge.WritableArray;
|
|
19
23
|
import com.facebook.react.bridge.WritableMap;
|
|
24
|
+
import com.facebook.react.bridge.WritableNativeArray;
|
|
25
|
+
import com.facebook.react.bridge.WritableNativeMap;
|
|
20
26
|
|
|
21
27
|
import java.io.BufferedInputStream;
|
|
22
28
|
import java.io.File;
|
|
@@ -24,35 +30,45 @@ import java.io.FileNotFoundException;
|
|
|
24
30
|
import java.io.FileOutputStream;
|
|
25
31
|
import java.io.InputStream;
|
|
26
32
|
import java.nio.charset.Charset;
|
|
27
|
-
import java.util.Date;
|
|
28
33
|
import java.util.HashMap;
|
|
29
34
|
import java.util.List;
|
|
30
35
|
import java.util.Map;
|
|
31
36
|
import java.util.UUID;
|
|
32
|
-
import java.util.
|
|
33
|
-
import java.util.
|
|
37
|
+
import java.util.concurrent.CountDownLatch;
|
|
38
|
+
import java.util.concurrent.TimeUnit;
|
|
34
39
|
|
|
35
40
|
import io.sentry.Breadcrumb;
|
|
41
|
+
import io.sentry.DateUtils;
|
|
36
42
|
import io.sentry.HubAdapter;
|
|
43
|
+
import io.sentry.ILogger;
|
|
44
|
+
import io.sentry.ISerializer;
|
|
37
45
|
import io.sentry.Integration;
|
|
38
46
|
import io.sentry.Sentry;
|
|
47
|
+
import io.sentry.SentryDate;
|
|
39
48
|
import io.sentry.SentryEvent;
|
|
40
49
|
import io.sentry.SentryLevel;
|
|
41
50
|
import io.sentry.UncaughtExceptionHandlerIntegration;
|
|
51
|
+
import io.sentry.android.core.AndroidLogger;
|
|
42
52
|
import io.sentry.android.core.AnrIntegration;
|
|
43
53
|
import io.sentry.android.core.AppStartState;
|
|
54
|
+
import io.sentry.android.core.BuildInfoProvider;
|
|
55
|
+
import io.sentry.android.core.CurrentActivityHolder;
|
|
44
56
|
import io.sentry.android.core.NdkIntegration;
|
|
45
57
|
import io.sentry.android.core.SentryAndroid;
|
|
58
|
+
import io.sentry.android.core.ViewHierarchyEventProcessor;
|
|
46
59
|
import io.sentry.protocol.SdkVersion;
|
|
47
60
|
import io.sentry.protocol.SentryException;
|
|
48
61
|
import io.sentry.protocol.SentryPackage;
|
|
49
62
|
import io.sentry.protocol.User;
|
|
63
|
+
import io.sentry.protocol.ViewHierarchy;
|
|
64
|
+
import io.sentry.util.JsonSerializationUtils;
|
|
50
65
|
|
|
51
66
|
public class RNSentryModuleImpl {
|
|
52
67
|
|
|
53
68
|
public static final String NAME = "RNSentry";
|
|
54
69
|
|
|
55
|
-
private static final
|
|
70
|
+
private static final ILogger logger = new AndroidLogger(NAME);
|
|
71
|
+
private static final BuildInfoProvider buildInfo = new BuildInfoProvider(logger);
|
|
56
72
|
private static final String modulesPath = "modules.json";
|
|
57
73
|
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
|
58
74
|
|
|
@@ -68,6 +84,8 @@ public class RNSentryModuleImpl {
|
|
|
68
84
|
// 16ms (slower than 60fps) to constitute slow frames.
|
|
69
85
|
private static final int SLOW_FRAME_THRESHOLD = 16;
|
|
70
86
|
|
|
87
|
+
private static final int SCREENSHOT_TIMEOUT_SECONDS = 2;
|
|
88
|
+
|
|
71
89
|
public RNSentryModuleImpl(ReactApplicationContext reactApplicationContext) {
|
|
72
90
|
packageInfo = getPackageInfo(reactApplicationContext);
|
|
73
91
|
this.reactApplicationContext = reactApplicationContext;
|
|
@@ -86,11 +104,10 @@ public class RNSentryModuleImpl {
|
|
|
86
104
|
SentryAndroid.init(this.getReactApplicationContext(), options -> {
|
|
87
105
|
if (rnOptions.hasKey("debug") && rnOptions.getBoolean("debug")) {
|
|
88
106
|
options.setDebug(true);
|
|
89
|
-
logger.setLevel(Level.INFO);
|
|
90
107
|
}
|
|
91
108
|
if (rnOptions.hasKey("dsn") && rnOptions.getString("dsn") != null) {
|
|
92
109
|
String dsn = rnOptions.getString("dsn");
|
|
93
|
-
logger.
|
|
110
|
+
logger.log(SentryLevel.INFO, String.format("Starting with DSN: '%s'", dsn));
|
|
94
111
|
options.setDsn(dsn);
|
|
95
112
|
} else {
|
|
96
113
|
// SentryAndroid needs an empty string fallback for the dsn.
|
|
@@ -134,6 +151,12 @@ public class RNSentryModuleImpl {
|
|
|
134
151
|
// by default we hide.
|
|
135
152
|
options.setAttachThreads(rnOptions.getBoolean("attachThreads"));
|
|
136
153
|
}
|
|
154
|
+
if (rnOptions.hasKey("attachScreenshot")) {
|
|
155
|
+
options.setAttachScreenshot(rnOptions.getBoolean("attachScreenshot"));
|
|
156
|
+
}
|
|
157
|
+
if (rnOptions.hasKey("attachViewHierarchy")) {
|
|
158
|
+
options.setAttachViewHierarchy(rnOptions.getBoolean("attachViewHierarchy"));
|
|
159
|
+
}
|
|
137
160
|
if (rnOptions.hasKey("sendDefaultPii")) {
|
|
138
161
|
options.setSendDefaultPii(rnOptions.getBoolean("sendDefaultPii"));
|
|
139
162
|
}
|
|
@@ -169,8 +192,13 @@ public class RNSentryModuleImpl {
|
|
|
169
192
|
}
|
|
170
193
|
}
|
|
171
194
|
}
|
|
195
|
+
logger.log(SentryLevel.INFO, String.format("Native Integrations '%s'", options.getIntegrations()));
|
|
172
196
|
|
|
173
|
-
|
|
197
|
+
final CurrentActivityHolder currentActivityHolder = CurrentActivityHolder.getInstance();
|
|
198
|
+
final Activity currentActivity = getCurrentActivity();
|
|
199
|
+
if (currentActivity != null) {
|
|
200
|
+
currentActivityHolder.setActivity(currentActivity);
|
|
201
|
+
}
|
|
174
202
|
});
|
|
175
203
|
|
|
176
204
|
promise.resolve(true);
|
|
@@ -193,7 +221,7 @@ public class RNSentryModuleImpl {
|
|
|
193
221
|
} catch (FileNotFoundException e) {
|
|
194
222
|
promise.resolve(null);
|
|
195
223
|
} catch (Throwable e) {
|
|
196
|
-
logger.
|
|
224
|
+
logger.log(SentryLevel.WARNING, "Fetching JS Modules failed.");
|
|
197
225
|
promise.resolve(null);
|
|
198
226
|
}
|
|
199
227
|
}
|
|
@@ -208,21 +236,21 @@ public class RNSentryModuleImpl {
|
|
|
208
236
|
|
|
209
237
|
public void fetchNativeAppStart(Promise promise) {
|
|
210
238
|
final AppStartState appStartInstance = AppStartState.getInstance();
|
|
211
|
-
final
|
|
239
|
+
final SentryDate appStartTime = appStartInstance.getAppStartTime();
|
|
212
240
|
final Boolean isColdStart = appStartInstance.isColdStart();
|
|
213
241
|
|
|
214
242
|
if (appStartTime == null) {
|
|
215
|
-
logger.
|
|
243
|
+
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing appStartTime.");
|
|
216
244
|
promise.resolve(null);
|
|
217
245
|
} else if (isColdStart == null) {
|
|
218
|
-
logger.
|
|
246
|
+
logger.log(SentryLevel.WARNING, "App start won't be sent due to missing isColdStart.");
|
|
219
247
|
promise.resolve(null);
|
|
220
248
|
} else {
|
|
221
|
-
final double
|
|
249
|
+
final double appStartTimestampMs = DateUtils.nanosToMillis(appStartTime.nanoTimestamp());
|
|
222
250
|
|
|
223
251
|
WritableMap appStart = Arguments.createMap();
|
|
224
252
|
|
|
225
|
-
appStart.putDouble("appStartTime",
|
|
253
|
+
appStart.putDouble("appStartTime", appStartTimestampMs);
|
|
226
254
|
appStart.putBoolean("isColdStart", isColdStart);
|
|
227
255
|
appStart.putBoolean("didFetchAppStart", didFetchAppStart);
|
|
228
256
|
|
|
@@ -280,7 +308,7 @@ public class RNSentryModuleImpl {
|
|
|
280
308
|
|
|
281
309
|
promise.resolve(map);
|
|
282
310
|
} catch (Throwable ignored) {
|
|
283
|
-
logger.
|
|
311
|
+
logger.log(SentryLevel.WARNING, "Error fetching native frames.");
|
|
284
312
|
promise.resolve(null);
|
|
285
313
|
}
|
|
286
314
|
}
|
|
@@ -296,7 +324,7 @@ public class RNSentryModuleImpl {
|
|
|
296
324
|
final String outboxPath = HubAdapter.getInstance().getOptions().getOutboxPath();
|
|
297
325
|
|
|
298
326
|
if (outboxPath == null) {
|
|
299
|
-
logger.
|
|
327
|
+
logger.log(SentryLevel.ERROR,
|
|
300
328
|
"Error retrieving outboxPath. Envelope will not be sent. Is the Android SDK initialized?");
|
|
301
329
|
} else {
|
|
302
330
|
File installation = new File(outboxPath, UUID.randomUUID().toString());
|
|
@@ -305,16 +333,100 @@ public class RNSentryModuleImpl {
|
|
|
305
333
|
}
|
|
306
334
|
}
|
|
307
335
|
} catch (Throwable ignored) {
|
|
308
|
-
logger.
|
|
336
|
+
logger.log(SentryLevel.ERROR, "Error while writing envelope to outbox.");
|
|
309
337
|
}
|
|
310
338
|
promise.resolve(true);
|
|
311
339
|
}
|
|
312
340
|
|
|
341
|
+
public void captureScreenshot(Promise promise) {
|
|
342
|
+
|
|
343
|
+
final Activity activity = getCurrentActivity();
|
|
344
|
+
if (activity == null) {
|
|
345
|
+
logger.log(SentryLevel.WARNING, "CurrentActivity is null, can't capture screenshot.");
|
|
346
|
+
promise.resolve(null);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
final byte[] raw = takeScreenshotOnUiThread(activity);
|
|
351
|
+
|
|
352
|
+
if (raw == null) {
|
|
353
|
+
logger.log(SentryLevel.WARNING, "Screenshot is null, screen was not captured.");
|
|
354
|
+
promise.resolve(null);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
final WritableNativeArray data = new WritableNativeArray();
|
|
359
|
+
for (final byte b : raw) {
|
|
360
|
+
data.pushInt(b);
|
|
361
|
+
}
|
|
362
|
+
final WritableMap screenshot = new WritableNativeMap();
|
|
363
|
+
screenshot.putString("contentType", "image/png");
|
|
364
|
+
screenshot.putArray("data", data);
|
|
365
|
+
screenshot.putString("filename", "screenshot.png");
|
|
366
|
+
|
|
367
|
+
final WritableArray screenshotsArray = new WritableNativeArray();
|
|
368
|
+
screenshotsArray.pushMap(screenshot);
|
|
369
|
+
promise.resolve(screenshotsArray);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
private static byte[] takeScreenshotOnUiThread(Activity activity) {
|
|
373
|
+
CountDownLatch doneSignal = new CountDownLatch(1);
|
|
374
|
+
final byte[][] bytesWrapper = {{}}; // wrapper to be able to set the value in the runnable
|
|
375
|
+
final Runnable runTakeScreenshot = () -> {
|
|
376
|
+
bytesWrapper[0] = takeScreenshot(activity, logger, buildInfo);
|
|
377
|
+
doneSignal.countDown();
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
if (UiThreadUtil.isOnUiThread()) {
|
|
381
|
+
runTakeScreenshot.run();
|
|
382
|
+
} else {
|
|
383
|
+
UiThreadUtil.runOnUiThread(runTakeScreenshot);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
try {
|
|
387
|
+
doneSignal.await(SCREENSHOT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
|
|
388
|
+
} catch (InterruptedException e) {
|
|
389
|
+
logger.log(SentryLevel.ERROR, "Screenshot process was interrupted.");
|
|
390
|
+
return null;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return bytesWrapper[0];
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
public void fetchViewHierarchy(Promise promise) {
|
|
397
|
+
final @Nullable Activity activity = getCurrentActivity();
|
|
398
|
+
final @Nullable ViewHierarchy viewHierarchy = ViewHierarchyEventProcessor.snapshotViewHierarchy(activity, logger);
|
|
399
|
+
if (viewHierarchy == null) {
|
|
400
|
+
logger.log(SentryLevel.ERROR, "Could not get ViewHierarchy.");
|
|
401
|
+
promise.resolve(null);
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
ISerializer serializer = HubAdapter.getInstance().getOptions().getSerializer();
|
|
406
|
+
final @Nullable byte[] bytes = JsonSerializationUtils.bytesFrom(serializer, logger, viewHierarchy);
|
|
407
|
+
if (bytes == null) {
|
|
408
|
+
logger.log(SentryLevel.ERROR, "Could not serialize ViewHierarchy.");
|
|
409
|
+
promise.resolve(null);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
if (bytes.length < 1) {
|
|
413
|
+
logger.log(SentryLevel.ERROR, "Got empty bytes array after serializing ViewHierarchy.");
|
|
414
|
+
promise.resolve(null);
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
final WritableNativeArray data = new WritableNativeArray();
|
|
419
|
+
for (final byte b : bytes) {
|
|
420
|
+
data.pushInt(b);
|
|
421
|
+
}
|
|
422
|
+
promise.resolve(data);
|
|
423
|
+
}
|
|
424
|
+
|
|
313
425
|
private static PackageInfo getPackageInfo(Context ctx) {
|
|
314
426
|
try {
|
|
315
427
|
return ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0);
|
|
316
428
|
} catch (PackageManager.NameNotFoundException e) {
|
|
317
|
-
logger.
|
|
429
|
+
logger.log(SentryLevel.WARNING, "Error getting package info.");
|
|
318
430
|
return null;
|
|
319
431
|
}
|
|
320
432
|
}
|
|
@@ -469,17 +581,17 @@ public class RNSentryModuleImpl {
|
|
|
469
581
|
try {
|
|
470
582
|
frameMetricsAggregator.add(currentActivity);
|
|
471
583
|
|
|
472
|
-
logger.
|
|
584
|
+
logger.log(SentryLevel.INFO, "FrameMetricsAggregator installed.");
|
|
473
585
|
} catch (Throwable ignored) {
|
|
474
586
|
// throws ConcurrentModification when calling addOnFrameMetricsAvailableListener
|
|
475
587
|
// this is a best effort since we can't reproduce it
|
|
476
|
-
logger.
|
|
588
|
+
logger.log(SentryLevel.ERROR, "Error adding Activity to frameMetricsAggregator.");
|
|
477
589
|
}
|
|
478
590
|
} else {
|
|
479
|
-
logger.
|
|
591
|
+
logger.log(SentryLevel.INFO, "currentActivity isn't available.");
|
|
480
592
|
}
|
|
481
593
|
} else {
|
|
482
|
-
logger.
|
|
594
|
+
logger.log(SentryLevel.WARNING, "androidx.core' isn't available as a dependency.");
|
|
483
595
|
}
|
|
484
596
|
}
|
|
485
597
|
|
|
@@ -57,6 +57,16 @@ public class RNSentryModule extends NativeRNSentrySpec {
|
|
|
57
57
|
this.impl.captureEnvelope(rawBytes, options, promise);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
@Override
|
|
61
|
+
public void captureScreenshot(Promise promise) {
|
|
62
|
+
this.impl.captureScreenshot(promise);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@Override
|
|
66
|
+
public void fetchViewHierarchy(Promise promise){
|
|
67
|
+
this.impl.fetchViewHierarchy(promise);
|
|
68
|
+
}
|
|
69
|
+
|
|
60
70
|
@Override
|
|
61
71
|
public void setUser(final ReadableMap user, final ReadableMap otherUserKeys) {
|
|
62
72
|
this.impl.setUser(user, otherUserKeys);
|
|
@@ -57,6 +57,16 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
|
|
|
57
57
|
this.impl.captureEnvelope(rawBytes, options, promise);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
@ReactMethod
|
|
61
|
+
public void captureScreenshot(Promise promise) {
|
|
62
|
+
this.impl.captureScreenshot(promise);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@ReactMethod
|
|
66
|
+
public void fetchViewHierarchy(Promise promise){
|
|
67
|
+
this.impl.fetchViewHierarchy(promise);
|
|
68
|
+
}
|
|
69
|
+
|
|
60
70
|
@ReactMethod
|
|
61
71
|
public void setUser(final ReadableMap user, final ReadableMap otherUserKeys) {
|
|
62
72
|
this.impl.setUser(user, otherUserKeys);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Package } from '@sentry/types';
|
|
2
|
-
import { TurboModule } from 'react-native';
|
|
1
|
+
import type { Package } from '@sentry/types';
|
|
2
|
+
import type { TurboModule } from 'react-native';
|
|
3
3
|
import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
export interface Spec extends TurboModule {
|
|
5
5
|
addBreadcrumb(breadcrumb: UnsafeObject): void;
|
|
6
6
|
captureEnvelope(bytes: number[], options: {
|
|
7
7
|
store: boolean;
|
|
8
8
|
}): Promise<boolean>;
|
|
9
|
+
captureScreenshot(): Promise<NativeScreenshot[]>;
|
|
9
10
|
clearBreadcrumbs(): void;
|
|
10
11
|
crash(): void;
|
|
11
12
|
closeNativeSdk(): Promise<void>;
|
|
@@ -22,6 +23,7 @@ export interface Spec extends TurboModule {
|
|
|
22
23
|
setTag(key: string, value: string): void;
|
|
23
24
|
enableNativeFramesTracking(): void;
|
|
24
25
|
fetchModules(): Promise<string | undefined | null>;
|
|
26
|
+
fetchViewHierarchy(): Promise<number[] | undefined | null>;
|
|
25
27
|
}
|
|
26
28
|
export declare type NativeAppStartResponse = {
|
|
27
29
|
isColdStart: boolean;
|
|
@@ -38,8 +40,40 @@ export declare type NativeReleaseResponse = {
|
|
|
38
40
|
id: string;
|
|
39
41
|
version: string;
|
|
40
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* This type describes serialized scope from sentry-cocoa. (This is not used for Android)
|
|
45
|
+
* https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m
|
|
46
|
+
*/
|
|
41
47
|
export declare type NativeDeviceContextsResponse = {
|
|
42
|
-
[key: string]:
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
tags?: Record<string, string>;
|
|
50
|
+
extra?: Record<string, unknown>;
|
|
51
|
+
context?: Record<string, Record<string, unknown>>;
|
|
52
|
+
user?: {
|
|
53
|
+
userId?: string;
|
|
54
|
+
email?: string;
|
|
55
|
+
username?: string;
|
|
56
|
+
ipAddress?: string;
|
|
57
|
+
segment?: string;
|
|
58
|
+
data?: Record<string, unknown>;
|
|
59
|
+
};
|
|
60
|
+
dist?: string;
|
|
61
|
+
environment?: string;
|
|
62
|
+
fingerprint?: string[];
|
|
63
|
+
level?: string;
|
|
64
|
+
breadcrumbs?: {
|
|
65
|
+
level?: string;
|
|
66
|
+
timestamp?: string;
|
|
67
|
+
category?: string;
|
|
68
|
+
type?: string;
|
|
69
|
+
message?: string;
|
|
70
|
+
data?: Record<string, unknown>;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
export declare type NativeScreenshot = {
|
|
74
|
+
data: number[];
|
|
75
|
+
contentType: string;
|
|
76
|
+
filename: string;
|
|
43
77
|
};
|
|
44
78
|
declare const _default: Spec;
|
|
45
79
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA2FnD,2DAA2D;AAC3D,eAAe,mBAAmB,CAAC,YAAY,CAAO,UAAU,CAAC,CAAC","sourcesContent":["import type { Package } from '@sentry/types';\nimport type { TurboModule} from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\nimport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\n\n// There has to be only one interface and it has to be named `Spec`\n// Only extra allowed definitions are types (probably codegen bug)\nexport interface Spec extends TurboModule {\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: number[],\n options: {\n store: boolean,\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[]>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(\n defaultUserKeys: UnsafeObject | null,\n otherUserKeys: UnsafeObject | null\n ): void;\n setContext(key: string, value: UnsafeObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n enableNativeFramesTracking(): void;\n fetchModules(): Promise<string | undefined | null>;\n fetchViewHierarchy(): Promise<number[] | undefined | null>;\n}\n\nexport type NativeAppStartResponse = {\n isColdStart: boolean;\n appStartTime: number;\n didFetchAppStart: boolean;\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\n/**\n * This type describes serialized scope from sentry-cocoa. (This is not used for Android)\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n context?: Record<string, Record<string, unknown>>;\n user?: {\n userId?: string;\n email?: string;\n username?: string;\n ipAddress?: string;\n segment?: string;\n data?: Record<string, unknown>;\n };\n dist?: string;\n environment?: string;\n fingerprint?: string[];\n level?: string;\n breadcrumbs?: {\n level?: string;\n timestamp?: string;\n category?: string;\n type?: string;\n message?: string;\n data?: Record<string, unknown>;\n }[];\n};\n\nexport type NativeScreenshot = {\n data: number[];\n contentType: string;\n filename: string;\n}\n\n// The export must be here to pass codegen even if not used\nexport default TurboModuleRegistry.getEnforcing<Spec>('RNSentry');\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Breadcrumb, SeverityLevel } from '@sentry/types';
|
|
2
|
+
export declare const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel;
|
|
3
|
+
declare type BreadcrumbCandidate = {
|
|
4
|
+
[K in keyof Partial<Breadcrumb>]: unknown;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Convert plain object to a valid Breadcrumb
|
|
8
|
+
*/
|
|
9
|
+
export declare function breadcrumbFromObject(candidate: BreadcrumbCandidate): Breadcrumb;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|