Skip to content

Commit

Permalink
Remove replays and add root check/profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleangels committed Jan 22, 2025
1 parent ca37a85 commit 3dab504
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.doubleangels.nextdnsmanagement.sentry;

import android.content.Context;

import io.sentry.android.core.BuildConfig;
import io.sentry.android.core.SentryAndroid;

public class SentryInitializer {
Expand All @@ -13,6 +15,8 @@ public static void initialize(Context context) {
SentryAndroid.init(context, options -> {
// Set the Data Source Name (DSN) for Sentry
options.setDsn("https://8b52cc2148b94716a69c9a4f0c0b4513@o244019.ingest.us.sentry.io/6270764");
// Dynamically set the release version from BuildConfig
options.setRelease(BuildConfig.VERSION_NAME);
// Enable automatic breadcrumbs for better error context
options.enableAllAutoBreadcrumbs(true);
// Attach screenshots to captured events
Expand All @@ -29,11 +33,10 @@ public static void initialize(Context context) {
options.setCollectAdditionalContext(true);
// Enable tracking of frames for performance monitoring
options.setEnableFramesTracking(true);
// Enable mobile replays
options.getSessionReplay().setOnErrorSampleRate(1.0);
options.getSessionReplay().setSessionSampleRate(1.0);
options.getSessionReplay().setMaskAllText(true);

// Enable app start profiling
options.setEnableAppStartProfiling(true);
// Enable root check
options.setEnableRootCheck(true);
});
}).start(); // Start the thread
}
Expand Down

0 comments on commit 3dab504

Please sign in to comment.