Skip to content

Commit f5a43d3

Browse files
authored
chore(deps): Bump Android SDK to v8.3.0 (#4490)
1 parent 9ad6fb8 commit f5a43d3

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ Change `Cold/Warm App Start` span description to `Cold/Warm Start` ([#4636](http
3838

3939
### Dependencies
4040

41-
- Bump Android SDK from v7.20.1 to v7.22.0 ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))
42-
- [changelog](https://github.com/getsentry/sentry-java/blob/7.x.x/CHANGELOG.md#7220)
43-
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...7.22.0)
41+
- Bump Android SDK from v7.20.1 to v8.3.0 ([#4490](https://github.com/getsentry/sentry-react-native/pull/4490))
42+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#830)
43+
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.3.0)
4444
- Bump Cocoa SDK from v8.44.0 to v8.45.0 ([#4537](https://github.com/getsentry/sentry-react-native/pull/4537))
4545
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8450)
4646
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.44.0...8.45.0)

packages/core/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ android {
5454

5555
dependencies {
5656
implementation 'com.facebook.react:react-native:+'
57-
api 'io.sentry:sentry-android:7.22.0'
57+
api 'io.sentry:sentry-android:8.3.0'
5858
}

packages/core/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java

+11-14
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
import com.facebook.react.common.JavascriptException;
3030
import com.facebook.react.modules.core.DeviceEventManagerModule;
3131
import io.sentry.Breadcrumb;
32-
import io.sentry.HubAdapter;
3332
import io.sentry.ILogger;
3433
import io.sentry.IScope;
3534
import io.sentry.ISentryExecutorService;
3635
import io.sentry.ISerializer;
3736
import io.sentry.Integration;
37+
import io.sentry.ScopesAdapter;
3838
import io.sentry.Sentry;
3939
import io.sentry.SentryDate;
4040
import io.sentry.SentryDateProvider;
@@ -85,6 +85,7 @@
8585
import java.util.List;
8686
import java.util.Map;
8787
import java.util.Properties;
88+
import java.util.Set;
8889
import java.util.concurrent.CountDownLatch;
8990
import org.jetbrains.annotations.NotNull;
9091
import org.jetbrains.annotations.Nullable;
@@ -505,7 +506,7 @@ public void fetchNativeFrames(Promise promise) {
505506
}
506507

507508
public void captureReplay(boolean isHardCrash, Promise promise) {
508-
Sentry.getCurrentHub().getOptions().getReplayController().captureReplay(isHardCrash);
509+
Sentry.getCurrentScopes().getOptions().getReplayController().captureReplay(isHardCrash);
509510
promise.resolve(getCurrentReplayId());
510511
}
511512

@@ -601,7 +602,7 @@ public void fetchViewHierarchy(Promise promise) {
601602
return;
602603
}
603604

604-
ISerializer serializer = HubAdapter.getInstance().getOptions().getSerializer();
605+
ISerializer serializer = ScopesAdapter.getInstance().getOptions().getSerializer();
605606
final @Nullable byte[] bytes =
606607
JsonSerializationUtils.bytesFrom(serializer, logger, viewHierarchy);
607608
if (bytes == null) {
@@ -655,10 +656,6 @@ public void setUser(final ReadableMap userKeys, final ReadableMap userDataKeys)
655656
if (userKeys.hasKey("ip_address")) {
656657
userInstance.setIpAddress(userKeys.getString("ip_address"));
657658
}
658-
659-
if (userKeys.hasKey("segment")) {
660-
userInstance.setSegment(userKeys.getString("segment"));
661-
}
662659
}
663660

664661
if (userDataKeys != null) {
@@ -807,8 +804,7 @@ private void initializeAndroidProfiler() {
807804
(int) SECONDS.toMicros(1) / profilingTracesHz,
808805
new SentryFrameMetricsCollector(reactApplicationContext, logger, buildInfo),
809806
executorService,
810-
logger,
811-
buildInfo);
807+
logger);
812808
}
813809

814810
public WritableMap startProfiling(boolean platformProfilers) {
@@ -832,7 +828,7 @@ public WritableMap startProfiling(boolean platformProfilers) {
832828
}
833829

834830
public WritableMap stopProfiling() {
835-
final boolean isDebug = HubAdapter.getInstance().getOptions().isDebug();
831+
final boolean isDebug = ScopesAdapter.getInstance().getOptions().isDebug();
836832
final WritableMap result = new WritableNativeMap();
837833
File output = null;
838834
try {
@@ -918,7 +914,7 @@ private String readStringFromFile(File path) throws IOException {
918914
}
919915

920916
public void fetchNativeDeviceContexts(Promise promise) {
921-
final @NotNull SentryOptions options = HubAdapter.getInstance().getOptions();
917+
final @NotNull SentryOptions options = ScopesAdapter.getInstance().getOptions();
922918
final @Nullable Context context = this.getReactApplicationContext().getApplicationContext();
923919
final @Nullable IScope currentScope = InternalSentrySdk.getCurrentScope();
924920
fetchNativeDeviceContexts(promise, options, context, currentScope);
@@ -955,7 +951,8 @@ protected void fetchNativeDeviceContexts(
955951
}
956952

957953
public void fetchNativeSdkInfo(Promise promise) {
958-
final @Nullable SdkVersion sdkVersion = HubAdapter.getInstance().getOptions().getSdkVersion();
954+
final @Nullable SdkVersion sdkVersion =
955+
ScopesAdapter.getInstance().getOptions().getSdkVersion();
959956
if (sdkVersion == null) {
960957
promise.resolve(null);
961958
} else {
@@ -1001,14 +998,14 @@ private void addPackages(SentryEvent event, SdkVersion sdk) {
1001998
if (eventSdk != null
1002999
&& "sentry.javascript.react-native".equals(eventSdk.getName())
10031000
&& sdk != null) {
1004-
List<SentryPackage> sentryPackages = sdk.getPackages();
1001+
Set<SentryPackage> sentryPackages = sdk.getPackageSet();
10051002
if (sentryPackages != null) {
10061003
for (SentryPackage sentryPackage : sentryPackages) {
10071004
eventSdk.addPackage(sentryPackage.getName(), sentryPackage.getVersion());
10081005
}
10091006
}
10101007

1011-
List<String> integrations = sdk.getIntegrations();
1008+
Set<String> integrations = sdk.getIntegrationSet();
10121009
if (integrations != null) {
10131010
for (String integration : integrations) {
10141011
eventSdk.addIntegration(integration);

0 commit comments

Comments
 (0)