Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry/src/main/java/io/sentry/Sentry.java
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private static boolean initConfigurations(final @NotNull SentryOptions options)
options.addPerformanceCollector(new JavaMemoryCollector());
}

if (options.isEnableBackpressureHandling()) {
if (options.isEnableBackpressureHandling() && Platform.isJvm()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there's currently no way of disabling backpressure for Android via Metadata I only enable it for backend. There usually shouldn't be as high a volume of transactions on Android.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided in Backend Daily it's OK to disable backpressure management for Android. If we ever want it we'll have to make it configurable and probably do a separate test phase before enabling it by default there.

options.setBackpressureMonitor(new BackpressureMonitor(options, HubAdapter.getInstance()));
options.getBackpressureMonitor().start();
}
Expand Down
3 changes: 1 addition & 2 deletions sentry/src/main/java/io/sentry/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,9 @@ public class SentryOptions {
/** Contains a list of monitor slugs for which check-ins should not be sent. */
@ApiStatus.Experimental private @Nullable List<String> ignoredCheckIns = null;

@ApiStatus.Experimental
private @NotNull IBackpressureMonitor backpressureMonitor = NoOpBackpressureMonitor.getInstance();

@ApiStatus.Experimental private boolean enableBackpressureHandling = false;
private boolean enableBackpressureHandling = true;

/** Whether to profile app launches, depending on profilesSampler or profilesSampleRate. */
private boolean enableAppStartProfiling = false;
Expand Down