@sentry/react-native 5.19.3 → 5.20.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 (84) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/RNSentry.podspec +1 -1
  3. package/android/src/main/java/io/sentry/react/{MapConverter.java → RNSentryMapConverter.java} +1 -1
  4. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +55 -10
  5. package/android/src/main/java/io/sentry/react/RNSentryOnDrawReporterManager.java +139 -0
  6. package/android/src/main/java/io/sentry/react/RNSentryPackage.java +13 -0
  7. package/android/src/main/java/io/sentry/react/RNSentryReactFragmentLifecycleTracer.java +99 -0
  8. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +15 -1
  9. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +15 -0
  10. package/dist/js/NativeRNSentry.d.ts +3 -0
  11. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  12. package/dist/js/NativeRNSentry.js.map +1 -1
  13. package/dist/js/index.d.ts +2 -2
  14. package/dist/js/index.d.ts.map +1 -1
  15. package/dist/js/index.js +1 -1
  16. package/dist/js/index.js.map +1 -1
  17. package/dist/js/tracing/index.d.ts +1 -0
  18. package/dist/js/tracing/index.d.ts.map +1 -1
  19. package/dist/js/tracing/index.js +1 -0
  20. package/dist/js/tracing/index.js.map +1 -1
  21. package/dist/js/tracing/reactnativeprofiler.d.ts +4 -0
  22. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  23. package/dist/js/tracing/reactnativeprofiler.js +12 -0
  24. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  25. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  26. package/dist/js/tracing/reactnativetracing.js +15 -2
  27. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  28. package/dist/js/tracing/reactnavigation.d.ts +10 -1
  29. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  30. package/dist/js/tracing/reactnavigation.js +69 -4
  31. package/dist/js/tracing/reactnavigation.js.map +1 -1
  32. package/dist/js/tracing/timetodisplay.d.ts +46 -0
  33. package/dist/js/tracing/timetodisplay.d.ts.map +1 -0
  34. package/dist/js/tracing/timetodisplay.js +198 -0
  35. package/dist/js/tracing/timetodisplay.js.map +1 -0
  36. package/dist/js/tracing/timetodisplaynative.d.ts +17 -0
  37. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -0
  38. package/dist/js/tracing/timetodisplaynative.js +27 -0
  39. package/dist/js/tracing/timetodisplaynative.js.map +1 -0
  40. package/dist/js/tracing/timetodisplaynative.types.d.ts +14 -0
  41. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -0
  42. package/dist/js/tracing/timetodisplaynative.types.js +2 -0
  43. package/dist/js/tracing/timetodisplaynative.types.js.map +1 -0
  44. package/dist/js/tracing/utils.d.ts +8 -3
  45. package/dist/js/tracing/utils.d.ts.map +1 -1
  46. package/dist/js/tracing/utils.js +19 -0
  47. package/dist/js/tracing/utils.js.map +1 -1
  48. package/dist/js/utils/sentryeventemitter.d.ts +24 -0
  49. package/dist/js/utils/sentryeventemitter.d.ts.map +1 -0
  50. package/dist/js/utils/sentryeventemitter.js +82 -0
  51. package/dist/js/utils/sentryeventemitter.js.map +1 -0
  52. package/dist/js/version.d.ts +1 -1
  53. package/dist/js/version.js +1 -1
  54. package/dist/js/version.js.map +1 -1
  55. package/dist/js/wrapper.d.ts +5 -0
  56. package/dist/js/wrapper.d.ts.map +1 -1
  57. package/dist/js/wrapper.js +20 -3
  58. package/dist/js/wrapper.js.map +1 -1
  59. package/ios/RNSentry.h +2 -1
  60. package/ios/RNSentry.mm +44 -0
  61. package/ios/RNSentryDependencyContainer.h +15 -0
  62. package/ios/RNSentryDependencyContainer.m +32 -0
  63. package/ios/RNSentryEvents.h +3 -0
  64. package/ios/RNSentryEvents.m +3 -0
  65. package/ios/RNSentryFramesTrackerListener.h +17 -0
  66. package/ios/RNSentryFramesTrackerListener.m +30 -0
  67. package/ios/RNSentryOnDrawReporter.m +70 -0
  68. package/ios/RNSentryRNSScreen.h +7 -0
  69. package/ios/RNSentryRNSScreen.m +26 -0
  70. package/package.json +3 -2
  71. package/scripts/expo-upload-sourcemaps.js +15 -1
  72. package/src/js/NativeRNSentry.ts +3 -0
  73. package/ts3.8/dist/js/NativeRNSentry.d.ts +3 -0
  74. package/ts3.8/dist/js/index.d.ts +2 -2
  75. package/ts3.8/dist/js/tracing/index.d.ts +1 -0
  76. package/ts3.8/dist/js/tracing/reactnativeprofiler.d.ts +4 -0
  77. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +10 -1
  78. package/ts3.8/dist/js/tracing/timetodisplay.d.ts +46 -0
  79. package/ts3.8/dist/js/tracing/timetodisplaynative.d.ts +17 -0
  80. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +14 -0
  81. package/ts3.8/dist/js/tracing/utils.d.ts +8 -3
  82. package/ts3.8/dist/js/utils/sentryeventemitter.d.ts +24 -0
  83. package/ts3.8/dist/js/version.d.ts +1 -1
  84. package/ts3.8/dist/js/wrapper.d.ts +5 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.20.0
4
+
5
+ ### Features
6
+
7
+ - Automatic tracing of time to initial display for `react-navigation` ([#3588](https://github.com/getsentry/sentry-react-native/pull/3588))
8
+
9
+ When enabled the instrumentation will create TTID spans and measurements.
10
+ The TTID timestamp represent moment when the `react-navigation` screen
11
+ was rendered by the native code.
12
+
13
+ ```javascript
14
+ const routingInstrumentation = new Sentry.ReactNavigationInstrumentation({
15
+ enableTimeToInitialDisplay: true,
16
+ });
17
+
18
+ Sentry.init({
19
+ integrations: [new Sentry.ReactNativeTracing({routingInstrumentation})],
20
+ });
21
+ ```
22
+
23
+ - Tracing of full display using manual API ([#3654](https://github.com/getsentry/sentry-react-native/pull/3654))
24
+
25
+ In combination with the `react-navigation` automatic instrumentation you can record when
26
+ the application screen is fully rendered.
27
+
28
+ For more examples and manual time to initial display see [the documentation](https://docs.sentry.io/platforms/react-native/performance/instrumentation/time-to-display).
29
+
30
+ ```javascript
31
+ function Example() {
32
+ const [loaded] = React.useState(false);
33
+
34
+ return <View>
35
+ <Sentry.TimeToFullDisplay record={loaded}>
36
+ <Text>Example content</Text>
37
+ </Sentry.TimeToFullDisplay>
38
+ </View>;
39
+ }
40
+ ```
41
+
42
+ ### Fixes
43
+
44
+ - Allow custom `sentryUrl` for Expo updates source maps uploads ([#3664](https://github.com/getsentry/sentry-react-native/pull/3664))
45
+ - Missing Mobile Vitals (slow, frozen frames) when ActiveSpan (Transaction) is trimmed at the end ([#3684](https://github.com/getsentry/sentry-react-native/pull/3684))
46
+
3
47
  ## 5.19.3
4
48
 
5
49
  ### Fixes
package/RNSentry.podspec CHANGED
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.dependency 'React-Core'
36
36
  s.dependency 'Sentry/HybridSDK', '8.21.0'
37
37
 
38
- s.source_files = 'ios/**/*.{h,mm}'
38
+ s.source_files = 'ios/**/*.{h,m,mm}'
39
39
  s.public_header_files = 'ios/RNSentry.h'
40
40
 
41
41
  s.compiler_flags = other_cflags
@@ -17,7 +17,7 @@ import io.sentry.ILogger;
17
17
  import io.sentry.SentryLevel;
18
18
  import io.sentry.android.core.AndroidLogger;
19
19
 
20
- public class MapConverter {
20
+ public class RNSentryMapConverter {
21
21
  public static final String NAME = "RNSentry.MapConverter";
22
22
 
23
23
  private static final ILogger logger = new AndroidLogger(NAME);
@@ -13,6 +13,8 @@ import android.content.res.AssetManager;
13
13
  import android.util.SparseIntArray;
14
14
 
15
15
  import androidx.core.app.FrameMetricsAggregator;
16
+ import androidx.fragment.app.FragmentActivity;
17
+ import androidx.fragment.app.FragmentManager;
16
18
 
17
19
  import com.facebook.hermes.instrumentation.HermesSamplingProfiler;
18
20
  import com.facebook.react.bridge.Arguments;
@@ -25,15 +27,14 @@ import com.facebook.react.bridge.WritableArray;
25
27
  import com.facebook.react.bridge.WritableMap;
26
28
  import com.facebook.react.bridge.WritableNativeArray;
27
29
  import com.facebook.react.bridge.WritableNativeMap;
30
+ import com.facebook.react.modules.core.DeviceEventManagerModule;
28
31
 
29
32
  import org.jetbrains.annotations.NotNull;
30
33
  import org.jetbrains.annotations.Nullable;
31
34
 
32
35
  import java.io.BufferedInputStream;
33
36
  import java.io.BufferedReader;
34
- import java.io.ByteArrayOutputStream;
35
37
  import java.io.File;
36
- import java.io.FileInputStream;
37
38
  import java.io.FileNotFoundException;
38
39
  import java.io.FileReader;
39
40
  import java.io.IOException;
@@ -55,6 +56,7 @@ import io.sentry.ISerializer;
55
56
  import io.sentry.Integration;
56
57
  import io.sentry.Sentry;
57
58
  import io.sentry.SentryDate;
59
+ import io.sentry.SentryDateProvider;
58
60
  import io.sentry.SentryEvent;
59
61
  import io.sentry.SentryExecutorService;
60
62
  import io.sentry.SentryLevel;
@@ -69,6 +71,7 @@ import io.sentry.android.core.CurrentActivityHolder;
69
71
  import io.sentry.android.core.InternalSentrySdk;
70
72
  import io.sentry.android.core.NdkIntegration;
71
73
  import io.sentry.android.core.SentryAndroid;
74
+ import io.sentry.android.core.SentryAndroidDateProvider;
72
75
  import io.sentry.android.core.SentryAndroidOptions;
73
76
  import io.sentry.android.core.ViewHierarchyEventProcessor;
74
77
  import io.sentry.android.core.internal.debugmeta.AssetsDebugMetaLoader;
@@ -123,21 +126,53 @@ public class RNSentryModuleImpl {
123
126
  private String cacheDirPath = null;
124
127
  private ISentryExecutorService executorService = null;
125
128
 
129
+ private final @NotNull Runnable emitNewFrameEvent;
130
+
126
131
  /** Max trace file size in bytes. */
127
132
  private long maxTraceFileSize = 5 * 1024 * 1024;
128
133
 
129
134
  public RNSentryModuleImpl(ReactApplicationContext reactApplicationContext) {
130
- packageInfo = getPackageInfo(reactApplicationContext);
131
- this.reactApplicationContext = reactApplicationContext;
135
+ packageInfo = getPackageInfo(reactApplicationContext);
136
+ this.reactApplicationContext = reactApplicationContext;
137
+ this.emitNewFrameEvent = createEmitNewFrameEvent();
132
138
  }
133
139
 
134
140
  private ReactApplicationContext getReactApplicationContext() {
135
- return this.reactApplicationContext;
141
+ return this.reactApplicationContext;
142
+ }
143
+
144
+ private @Nullable Activity getCurrentActivity() {
145
+ return this.reactApplicationContext.getCurrentActivity();
146
+ }
147
+
148
+ private @NotNull Runnable createEmitNewFrameEvent() {
149
+ final @NotNull SentryDateProvider dateProvider = new SentryAndroidDateProvider();
150
+
151
+ return () -> {
152
+ final SentryDate endDate = dateProvider.now();
153
+ WritableMap event = Arguments.createMap();
154
+ event.putDouble("newFrameTimestampInSeconds", endDate.nanoTimestamp() / 1e9);
155
+ getReactApplicationContext()
156
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
157
+ .emit("rn_sentry_new_frame", event);
158
+ };
159
+ }
160
+
161
+ private void initFragmentInitialFrameTracking() {
162
+ final RNSentryReactFragmentLifecycleTracer fragmentLifecycleTracer =
163
+ new RNSentryReactFragmentLifecycleTracer(buildInfo, emitNewFrameEvent, logger);
164
+
165
+ final @Nullable FragmentActivity fragmentActivity = (FragmentActivity) getCurrentActivity();
166
+ if (fragmentActivity != null) {
167
+ final @Nullable FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
168
+ if (supportFragmentManager != null) {
169
+ supportFragmentManager.registerFragmentLifecycleCallbacks(fragmentLifecycleTracer, true);
170
+ }
171
+ }
136
172
  }
137
173
 
138
- private @Nullable
139
- Activity getCurrentActivity() {
140
- return this.reactApplicationContext.getCurrentActivity();
174
+ public void initNativeReactNavigationNewFrameTracking(Promise promise) {
175
+ this.initFragmentInitialFrameTracking();
141
176
  }
142
177
 
143
178
  public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
@@ -151,7 +186,7 @@ public class RNSentryModuleImpl {
151
186
 
152
187
  options.setSentryClientName(sdkVersion.getName() + "/" + sdkVersion.getVersion());
153
188
  options.setNativeSdkName(NATIVE_SDK_NAME);
154
- options.setSdkVersion(sdkVersion);
189
+ options.setSdkVersion(sdkVersion);
155
190
 
156
191
  if (rnOptions.hasKey("debug") && rnOptions.getBoolean("debug")) {
157
192
  options.setDebug(true);
@@ -262,6 +297,16 @@ public class RNSentryModuleImpl {
262
297
  throw new RuntimeException("TEST - Sentry Client Crash (only works in release mode)");
263
298
  }
264
299
 
300
+ public void addListener(String _eventType) {
301
+ // Is must be defined otherwise the generated interface from TS won't be fulfilled
302
+ logger.log(SentryLevel.ERROR, "addListener of NativeEventEmitter can't be used on Android!");
303
+ }
304
+
305
+ public void removeListeners(double _id) {
306
+ // Is must be defined otherwise the generated interface from TS won't be fulfilled
307
+ logger.log(SentryLevel.ERROR, "removeListeners of NativeEventEmitter can't be used on Android!");
308
+ }
309
+
265
310
  public void fetchModules(Promise promise) {
266
311
  final AssetManager assets = this.getReactApplicationContext().getResources().getAssets();
267
312
  try (final InputStream stream =
@@ -780,7 +825,7 @@ public class RNSentryModuleImpl {
780
825
  context,
781
826
  (SentryAndroidOptions) options,
782
827
  currentScope);
783
- final @Nullable Object deviceContext = MapConverter.convertToWritable(serialized);
828
+ final @Nullable Object deviceContext = RNSentryMapConverter.convertToWritable(serialized);
784
829
  promise.resolve(deviceContext);
785
830
  }
786
831
 
@@ -0,0 +1,139 @@
1
+ package io.sentry.react;
2
+
3
+ import android.app.Activity;
4
+ import android.content.Context;
5
+ import android.view.View;
6
+
7
+ import com.facebook.react.bridge.Arguments;
8
+ import com.facebook.react.bridge.ReactApplicationContext;
9
+ import com.facebook.react.bridge.WritableMap;
10
+ import com.facebook.react.common.MapBuilder;
11
+ import com.facebook.react.uimanager.SimpleViewManager;
12
+ import com.facebook.react.uimanager.ThemedReactContext;
13
+ import com.facebook.react.uimanager.annotations.ReactProp;
14
+ import com.facebook.react.uimanager.events.RCTEventEmitter;
15
+
16
+ import org.jetbrains.annotations.NotNull;
17
+ import org.jetbrains.annotations.Nullable;
18
+
19
+ import java.util.Map;
20
+
21
+ import io.sentry.SentryDate;
22
+ import io.sentry.SentryDateProvider;
23
+ import io.sentry.android.core.AndroidLogger;
24
+ import io.sentry.android.core.BuildInfoProvider;
25
+ import io.sentry.android.core.SentryAndroidDateProvider;
26
+ import io.sentry.android.core.internal.util.FirstDrawDoneListener;
27
+
28
+ public class RNSentryOnDrawReporterManager extends SimpleViewManager<RNSentryOnDrawReporterManager.RNSentryOnDrawReporterView> {
29
+
30
+ public static final String REACT_CLASS = "RNSentryOnDrawReporter";
31
+ private final @NotNull ReactApplicationContext mCallerContext;
32
+
33
+ public RNSentryOnDrawReporterManager(ReactApplicationContext reactContext) {
34
+ mCallerContext = reactContext;
35
+ }
36
+
37
+ @NotNull
38
+ @Override
39
+ public String getName() {
40
+ return REACT_CLASS;
41
+ }
42
+
43
+ @NotNull
44
+ @Override
45
+ protected RNSentryOnDrawReporterView createViewInstance(@NotNull ThemedReactContext themedReactContext) {
46
+ return new RNSentryOnDrawReporterView(mCallerContext, new BuildInfoProvider(new AndroidLogger()));
47
+ }
48
+
49
+ @ReactProp(name = "initialDisplay", defaultBoolean = false)
50
+ public void setInitialDisplay(RNSentryOnDrawReporterView view, boolean initialDisplay) {
51
+ view.setInitialDisplay(initialDisplay);
52
+ }
53
+
54
+ @ReactProp(name = "fullDisplay", defaultBoolean = false)
55
+ public void setFullDisplay(RNSentryOnDrawReporterView view, boolean fullDisplay) {
56
+ view.setFullDisplay(fullDisplay);
57
+ }
58
+
59
+ public Map getExportedCustomBubblingEventTypeConstants() {
60
+ return MapBuilder.builder().put(
61
+ "onDrawNextFrameView",
62
+ MapBuilder.of(
63
+ "phasedRegistrationNames",
64
+ MapBuilder.of("bubbled", "onDrawNextFrame")
65
+ )
66
+ ).build();
67
+ }
68
+
69
+ public static class RNSentryOnDrawReporterView extends View {
70
+
71
+ private final @Nullable ReactApplicationContext reactContext;
72
+ private final @NotNull SentryDateProvider dateProvider = new SentryAndroidDateProvider();
73
+ private final @Nullable Runnable emitInitialDisplayEvent;
74
+ private final @Nullable Runnable emitFullDisplayEvent;
75
+ private final @Nullable BuildInfoProvider buildInfo;
76
+
77
+
78
+ public RNSentryOnDrawReporterView(@NotNull Context context) {
79
+ super(context);
80
+ reactContext = null;
81
+ buildInfo = null;
82
+ emitInitialDisplayEvent = null;
83
+ emitFullDisplayEvent = null;
84
+ }
85
+
86
+ public RNSentryOnDrawReporterView(@NotNull ReactApplicationContext context, @NotNull BuildInfoProvider buildInfoProvider) {
87
+ super(context);
88
+ reactContext = context;
89
+ buildInfo = buildInfoProvider;
90
+ emitInitialDisplayEvent = () -> emitDisplayEvent("initialDisplay");
91
+ emitFullDisplayEvent = () -> emitDisplayEvent("fullDisplay");
92
+ }
93
+
94
+ public void setFullDisplay(boolean fullDisplay) {
95
+ if (!fullDisplay) {
96
+ return;
97
+ }
98
+
99
+ registerForNextDraw(emitFullDisplayEvent);
100
+ }
101
+
102
+ public void setInitialDisplay(boolean initialDisplay) {
103
+ if (!initialDisplay) {
104
+ return;
105
+ }
106
+
107
+ registerForNextDraw(emitInitialDisplayEvent);
108
+ }
109
+
110
+ private void registerForNextDraw(@Nullable Runnable emitter) {
111
+ if (reactContext == null) {
112
+ return;
113
+ }
114
+
115
+ @Nullable Activity activity = reactContext.getCurrentActivity();
116
+ if (activity == null || emitter == null || buildInfo == null) {
117
+ return;
118
+ }
119
+
120
+ FirstDrawDoneListener
121
+ .registerForNextDraw(activity, emitter, buildInfo);
122
+ }
123
+
124
+ private void emitDisplayEvent(String type) {
125
+ final SentryDate endDate = dateProvider.now();
126
+
127
+ WritableMap event = Arguments.createMap();
128
+ event.putString("type", type);
129
+ event.putDouble("newFrameTimestampInSeconds", endDate.nanoTimestamp() / 1e9);
130
+
131
+ if (reactContext == null) {
132
+ return;
133
+ }
134
+ reactContext
135
+ .getJSModule(RCTEventEmitter.class)
136
+ .receiveEvent(getId(), "onDrawNextFrameView", event);
137
+ }
138
+ }
139
+ }
@@ -1,8 +1,11 @@
1
1
  package io.sentry.react;
2
2
 
3
+ import androidx.annotation.NonNull;
3
4
  import androidx.annotation.Nullable;
4
5
 
6
+ import java.util.Arrays;
5
7
  import java.util.HashMap;
8
+ import java.util.List;
6
9
  import java.util.Map;
7
10
 
8
11
  import com.facebook.react.bridge.NativeModule;
@@ -10,6 +13,7 @@ import com.facebook.react.bridge.ReactApplicationContext;
10
13
  import com.facebook.react.module.model.ReactModuleInfo;
11
14
  import com.facebook.react.module.model.ReactModuleInfoProvider;
12
15
  import com.facebook.react.TurboReactPackage;
16
+ import com.facebook.react.uimanager.ViewManager;
13
17
 
14
18
  public class RNSentryPackage extends TurboReactPackage {
15
19
 
@@ -43,4 +47,13 @@ public class RNSentryPackage extends TurboReactPackage {
43
47
  };
44
48
  }
45
49
 
50
+ @NonNull
51
+ @Override
52
+ public List<ViewManager> createViewManagers(
53
+ ReactApplicationContext reactContext) {
54
+ return Arrays.asList(
55
+ new RNSentryOnDrawReporterManager(reactContext)
56
+ );
57
+ }
58
+
46
59
  }
@@ -0,0 +1,99 @@
1
+ package io.sentry.react;
2
+
3
+ import androidx.annotation.NonNull;
4
+ import androidx.fragment.app.Fragment;
5
+ import androidx.fragment.app.FragmentManager;
6
+ import androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks;
7
+
8
+ import android.os.Bundle;
9
+ import android.view.View;
10
+ import android.view.ViewGroup;
11
+
12
+ import com.facebook.react.bridge.ReactContext;
13
+ import com.facebook.react.uimanager.UIManagerHelper;
14
+ import com.facebook.react.uimanager.events.Event;
15
+ import com.facebook.react.uimanager.events.EventDispatcher;
16
+ import com.facebook.react.uimanager.events.EventDispatcherListener;
17
+
18
+ import org.jetbrains.annotations.Nullable;
19
+ import org.jetbrains.annotations.NotNull;
20
+
21
+ import io.sentry.ILogger;
22
+ import io.sentry.SentryLevel;
23
+ import io.sentry.android.core.BuildInfoProvider;
24
+ import io.sentry.android.core.internal.util.FirstDrawDoneListener;
25
+
26
+ public class RNSentryReactFragmentLifecycleTracer extends FragmentLifecycleCallbacks {
27
+
28
+ private @NotNull final BuildInfoProvider buildInfoProvider;
29
+ private @NotNull final Runnable emitNewFrameEvent;
30
+ private @NotNull final ILogger logger;
31
+
32
+ public RNSentryReactFragmentLifecycleTracer(
33
+ @NotNull BuildInfoProvider buildInfoProvider,
34
+ @NotNull Runnable emitNewFrameEvent,
35
+ @NotNull ILogger logger) {
36
+ this.buildInfoProvider = buildInfoProvider;
37
+ this.emitNewFrameEvent = emitNewFrameEvent;
38
+ this.logger = logger;
39
+ }
40
+
41
+ @Override
42
+ public void onFragmentViewCreated(
43
+ @NotNull FragmentManager fm,
44
+ @NotNull Fragment f,
45
+ @NotNull View v,
46
+ @Nullable Bundle savedInstanceState) {
47
+ if (!("com.swmansion.rnscreens.ScreenStackFragment".equals(f.getClass().getCanonicalName()))) {
48
+ logger.log(SentryLevel.DEBUG, "Fragment is not a ScreenStackFragment, won't listen for the first draw.");
49
+ return;
50
+ }
51
+
52
+ if (!(v instanceof ViewGroup)) {
53
+ logger.log(SentryLevel.WARNING, "Fragment view is not a ViewGroup, won't listen for the first draw.");
54
+ return;
55
+ }
56
+
57
+ final ViewGroup viewGroup = (ViewGroup) v;
58
+ if (viewGroup.getChildCount() == 0) {
59
+ logger.log(SentryLevel.WARNING, "Fragment view has no children, won't listen for the first draw.");
60
+ return;
61
+ }
62
+
63
+ final @Nullable View screen = viewGroup.getChildAt(0);
64
+ if (screen == null || !(screen.getContext() instanceof ReactContext)) {
65
+ logger.log(SentryLevel.WARNING, "Fragment view has no ReactContext, won't listen for the first draw.");
66
+ return;
67
+ }
68
+
69
+ final int screenId = screen.getId();
70
+ if (screenId == View.NO_ID) {
71
+ logger.log(SentryLevel.WARNING, "Screen has no id, won't listen for the first draw.");
72
+ return;
73
+ }
74
+
75
+ final @Nullable EventDispatcher eventDispatcher = getEventDispatcherForReactTag(screen, screenId);
76
+ if (eventDispatcher == null) {
77
+ logger.log(SentryLevel.WARNING, "Screen has no event dispatcher, won't listen for the first draw.");
78
+ return;
79
+ }
80
+
81
+ final @NotNull Runnable emitNewFrameEvent = this.emitNewFrameEvent;
82
+ eventDispatcher.addListener(new EventDispatcherListener() {
83
+ @Override
84
+ public void onEventDispatch(Event event) {
85
+ if ("com.swmansion.rnscreens.events.ScreenAppearEvent".equals(event.getClass().getCanonicalName())) {
86
+ eventDispatcher.removeListener(this);
87
+ FirstDrawDoneListener
88
+ .registerForNextDraw(v, emitNewFrameEvent, buildInfoProvider);
89
+ }
90
+ }
91
+ });
92
+ }
93
+
94
+ private static @Nullable EventDispatcher getEventDispatcherForReactTag(@NonNull View screen, int screenId) {
95
+ return UIManagerHelper.getEventDispatcherForReactTag(
96
+ UIManagerHelper.getReactContext(screen),
97
+ screenId);
98
+ }
99
+ }
@@ -2,7 +2,6 @@ package io.sentry.react;
2
2
 
3
3
  import androidx.annotation.NonNull;
4
4
 
5
- import com.facebook.react.bridge.JavaScriptExecutorFactory;
6
5
  import com.facebook.react.bridge.ReactApplicationContext;
7
6
  import com.facebook.react.bridge.ReadableArray;
8
7
  import com.facebook.react.bridge.ReadableMap;
@@ -24,6 +23,21 @@ public class RNSentryModule extends NativeRNSentrySpec {
24
23
  return RNSentryModuleImpl.NAME;
25
24
  }
26
25
 
26
+ @Override
27
+ public void addListener(String eventType) {
28
+ this.impl.addListener(eventType);
29
+ }
30
+
31
+ @Override
32
+ public void removeListeners(double id) {
33
+ this.impl.removeListeners(id);
34
+ }
35
+
36
+ @Override
37
+ public void initNativeReactNavigationNewFrameTracking(Promise promise) {
38
+ this.impl.initNativeReactNavigationNewFrameTracking(promise);
39
+ }
40
+
27
41
  @Override
28
42
  public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
29
43
  this.impl.initNativeSdk(rnOptions, promise);
@@ -23,6 +23,21 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
23
23
  return RNSentryModuleImpl.NAME;
24
24
  }
25
25
 
26
+ @ReactMethod
27
+ public void addListener(String eventType) {
28
+ this.impl.addListener(eventType);
29
+ }
30
+
31
+ @ReactMethod
32
+ public void removeListeners(double id) {
33
+ this.impl.removeListeners(id);
34
+ }
35
+
36
+ @ReactMethod
37
+ public void initNativeReactNavigationNewFrameTracking(Promise promise) {
38
+ this.impl.initNativeReactNavigationNewFrameTracking(promise);
39
+ }
40
+
26
41
  @ReactMethod
27
42
  public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
28
43
  this.impl.initNativeSdk(rnOptions, promise);
@@ -2,6 +2,8 @@ import type { Package } from '@sentry/types';
2
2
  import type { TurboModule } from 'react-native';
3
3
  import type { UnsafeObject } from './utils/rnlibrariesinterface';
4
4
  export interface Spec extends TurboModule {
5
+ addListener: (eventType: string) => void;
6
+ removeListeners: (id: number) => void;
5
7
  addBreadcrumb(breadcrumb: UnsafeObject): void;
6
8
  captureEnvelope(bytes: string, options: {
7
9
  store: boolean;
@@ -36,6 +38,7 @@ export interface Spec extends TurboModule {
36
38
  };
37
39
  fetchNativePackageName(): string | undefined | null;
38
40
  fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;
41
+ initNativeReactNavigationNewFrameTracking(): Promise<void>;
39
42
  }
40
43
  export type NativeStackFrame = {
41
44
  platform: string;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAIjE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,aAAa,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9C,eAAe,CACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC;KAChB,GACA,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,iBAAiB,IAAI,OAAO,CAAC,gBAAgB,EAAE,GAAG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version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA8InD,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';\n\nimport type { UnsafeObject } from './utils/rnlibrariesinterface';\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: string,\n options: {\n store: boolean;\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package | null>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse | null>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): 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 startProfiling(): { started?: boolean; error?: string };\n stopProfiling(): {\n profile?: string;\n nativeProfile?: UnsafeObject;\n androidProfile?: UnsafeObject;\n error?: string;\n };\n fetchNativePackageName(): string | undefined | null;\n fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;\n}\n\nexport type NativeStackFrame = {\n platform: string;\n /**\n * The instruction address of this frame.\n * Formatted as hex with 0x prefix.\n */\n instruction_addr: string;\n package?: string;\n /**\n * The debug image address of this frame.\n * Formatted as hex with 0x prefix.\n */\n image_addr?: string;\n in_app?: boolean;\n /**\n * The symbol name of this frame.\n * If symbolicated locally.\n */\n function?: string;\n /**\n * The symbol address of this frame.\n * If symbolicated locally.\n * Formatted as hex with 0x prefix.\n */\n symbol_addr?: string;\n};\n\nexport type NativeDebugImage = {\n name?: string;\n type?: string;\n uuid?: string;\n debug_id?: string;\n image_addr?: string;\n image_size?: number;\n code_file?: string;\n image_vmaddr?: string;\n};\n\nexport type NativeStackFrames = {\n frames: NativeStackFrame[];\n debugMetaImages?: NativeDebugImage[];\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 and sentry-android\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n contexts?: 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"]}
1
+ {"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAiJnD,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';\n\nimport type { UnsafeObject } from './utils/rnlibrariesinterface';\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 addListener: (eventType: string) => void;\n removeListeners: (id: number) => void;\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: string,\n options: {\n store: boolean;\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package | null>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse | null>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): 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 startProfiling(): { started?: boolean; error?: string };\n stopProfiling(): {\n profile?: string;\n nativeProfile?: UnsafeObject;\n androidProfile?: UnsafeObject;\n error?: string;\n };\n fetchNativePackageName(): string | undefined | null;\n fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;\n initNativeReactNavigationNewFrameTracking(): Promise<void>;\n}\n\nexport type NativeStackFrame = {\n platform: string;\n /**\n * The instruction address of this frame.\n * Formatted as hex with 0x prefix.\n */\n instruction_addr: string;\n package?: string;\n /**\n * The debug image address of this frame.\n * Formatted as hex with 0x prefix.\n */\n image_addr?: string;\n in_app?: boolean;\n /**\n * The symbol name of this frame.\n * If symbolicated locally.\n */\n function?: string;\n /**\n * The symbol address of this frame.\n * If symbolicated locally.\n * Formatted as hex with 0x prefix.\n */\n symbol_addr?: string;\n};\n\nexport type NativeDebugImage = {\n name?: string;\n type?: string;\n uuid?: string;\n debug_id?: string;\n image_addr?: string;\n image_size?: number;\n code_file?: string;\n image_vmaddr?: string;\n};\n\nexport type NativeStackFrames = {\n frames: NativeStackFrame[];\n debugMetaImages?: NativeDebugImage[];\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 and sentry-android\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n contexts?: 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"]}
@@ -8,7 +8,7 @@ export type { ReactNativeOptions } from './options';
8
8
  export { ReactNativeClient } from './client';
9
9
  export { init, wrap, setDist, setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configureScope, } from './sdk';
10
10
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
11
- export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, } from './tracing';
12
- export type { ReactNavigationTransactionContext } from './tracing';
11
+ export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, } from './tracing';
12
+ export type { ReactNavigationTransactionContext, TimeToDisplayProps } from './tracing';
13
13
  export { Integrations, SDK_NAME, SDK_VERSION };
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,EAGhB,iBAAiB,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;AAEnB,YAAY,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
package/dist/js/index.js CHANGED
@@ -18,6 +18,6 @@ setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configure
18
18
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
19
19
  export { ReactNativeTracing, ReactNavigationV4Instrumentation,
20
20
  // eslint-disable-next-line deprecation/deprecation
21
- ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, } from './tracing';
21
+ ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, } from './tracing';
22
22
  export { Integrations, SDK_NAME, SDK_VERSION };
23
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB;AAEhB,WAAW;AACX,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc;AAEd,YAAY;AACZ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,GACR,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,qBAAqB,EAAE,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI;AACJ,mDAAmD;AACnD,OAAO;AACP,mDAAmD;AACnD,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,SAAS,EACT,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC;AAChC,mDAAmD;AACnD,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC","sourcesContent":["export type {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startTransaction,\n\n // v8 spans\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n\n // v8 scopes\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metrics,\n} from '@sentry/core';\n\nimport { _addTracingExtensions } from './tracing/addTracingExtensions';\n_addTracingExtensions();\n\nexport {\n Integrations as BrowserIntegrations,\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport { lastEventId } from '@sentry/browser';\n\nimport * as Integrations from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport {\n init,\n wrap,\n // eslint-disable-next-line deprecation/deprecation\n setDist,\n // eslint-disable-next-line deprecation/deprecation\n setRelease,\n nativeCrash,\n flush,\n close,\n captureUserFeedback,\n withScope,\n configureScope,\n} from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n ReactNativeTracing,\n ReactNavigationV4Instrumentation,\n // eslint-disable-next-line deprecation/deprecation\n ReactNavigationV5Instrumentation,\n ReactNavigationInstrumentation,\n ReactNativeNavigationInstrumentation,\n RoutingInstrumentation,\n sentryTraceGesture,\n} from './tracing';\nexport type { ReactNavigationTransactionContext } from './tracing';\nexport { Integrations, SDK_NAME, SDK_VERSION };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB;AAEhB,WAAW;AACX,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc;AAEd,YAAY;AACZ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,GACR,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,qBAAqB,EAAE,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI;AACJ,mDAAmD;AACnD,OAAO;AACP,mDAAmD;AACnD,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,SAAS,EACT,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC;AAChC,mDAAmD;AACnD,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC","sourcesContent":["export type {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startTransaction,\n\n // v8 spans\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n\n // v8 scopes\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metrics,\n} from '@sentry/core';\n\nimport { _addTracingExtensions } from './tracing/addTracingExtensions';\n_addTracingExtensions();\n\nexport {\n Integrations as BrowserIntegrations,\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport { lastEventId } from '@sentry/browser';\n\nimport * as Integrations from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport {\n init,\n wrap,\n // eslint-disable-next-line deprecation/deprecation\n setDist,\n // eslint-disable-next-line deprecation/deprecation\n setRelease,\n nativeCrash,\n flush,\n close,\n captureUserFeedback,\n withScope,\n configureScope,\n} from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n ReactNativeTracing,\n ReactNavigationV4Instrumentation,\n // eslint-disable-next-line deprecation/deprecation\n ReactNavigationV5Instrumentation,\n ReactNavigationInstrumentation,\n ReactNativeNavigationInstrumentation,\n RoutingInstrumentation,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n} from './tracing';\n\nexport type { ReactNavigationTransactionContext, TimeToDisplayProps } from './tracing';\nexport { Integrations, SDK_NAME, SDK_VERSION };\n"]}
@@ -8,4 +8,5 @@ export type { ReactNavigationCurrentRoute, ReactNavigationRoute, ReactNavigation
8
8
  export { ReactNativeProfiler } from './reactnativeprofiler';
9
9
  export { sentryTraceGesture } from './gesturetracing';
10
10
  export * from './ops';
11
+ export * from './timetodisplay';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,YAAY,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,8BAA8B,EAE9B,gCAAgC,GACjC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAE/E,YAAY,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEpH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,YAAY,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,8BAA8B,EAE9B,gCAAgC,GACjC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAE/E,YAAY,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEpH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,cAAc,OAAO,CAAC;A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