Package 

Class SentryAndroidOptions

    • Constructor Detail

      • SentryAndroidOptions

        SentryAndroidOptions()
    • Method Detail

      • setAnrEnabled

         void setAnrEnabled(boolean anrEnabled)

        Sets ANR (Application Not Responding) to enabled or disabled Default is enabled

        Parameters:
        anrEnabled - true for enabled and false for disabled
      • setAnrTimeoutIntervalMillis

         void setAnrTimeoutIntervalMillis(long anrTimeoutIntervalMillis)

        Sets the ANR timeout internal in Millis Default is 5000 = 5s

        Parameters:
        anrTimeoutIntervalMillis - the timeout internal in Millis
      • setAnrReportInDebug

         void setAnrReportInDebug(boolean anrReportInDebug)

        Sets ANR (Application Not Responding) to enabled or disabled on Debug mode Default is disabled

        Parameters:
        anrReportInDebug - true for enabled and false for disabled
      • setEnableNdkAppHangTracking

        @ApiStatus.Experimental() void setEnableNdkAppHangTracking(boolean enableNdkAppHangTracking)

        Enables or disables heartbeat-based app-hang detection in sentry-native. Default is disabled.Requires the NDK integration to be present and emitting heartbeats via the native {@code * sentry_app_hang_heartbeat()}.

        Parameters:
        enableNdkAppHangTracking - true for enabled and false for disabled
      • getNdkAppHangTimeoutIntervalMillis

        @ApiStatus.Experimental() long getNdkAppHangTimeoutIntervalMillis()

        Returns the app-hang detection timeout interval in millis used by sentry-native. Default is5000 = 5s.

      • setNdkAppHangTimeoutIntervalMillis

        @ApiStatus.Experimental() void setNdkAppHangTimeoutIntervalMillis(long ndkAppHangTimeoutIntervalMillis)

        Sets the app-hang detection timeout interval in millis used by sentry-native. Default is 5000 =5s.

        Parameters:
        ndkAppHangTimeoutIntervalMillis - the timeout interval in millis
      • setEnableFramesTracking

         void setEnableFramesTracking(boolean enableFramesTracking)

        Enable or disable Frames Tracking, which is used to report slow and frozen frames.

        Parameters:
        enableFramesTracking - true if frames tracking should be enabled, false otherwise.
      • getNativeSdkName

        @ApiStatus.Internal()@Nullable() String getNativeSdkName()

        Returns the sdk name for the sentry native ndk module.

      • setNativeSdkName

        @ApiStatus.Internal() void setNativeSdkName(@Nullable() String nativeSdkName)

        Sets the sdk name for the sentry-native ndk module. The value is used for the event->sdkattribute and the sentry_client auth header.

        Parameters:
        nativeSdkName - the native sdk name
      • setEnableNdk

         void setEnableNdk(boolean enableNdk)

        Sets NDK to ON or OFF

        Parameters:
        enableNdk - true if ON or false otherwise
      • setEnableScopeSync

         void setEnableScopeSync(boolean enableScopeSync)

        Enables or not the Java to NDK Scope sync

        Parameters:
        enableScopeSync - true if enabled or false otherwise
      • setEnablePerformanceV2

         void setEnablePerformanceV2(boolean enablePerformanceV2)

        Enables or disables the Performance V2 SDK features.

        With this change - Cold app start spans will provide more accurate timings - Cold app startspans will be enriched with detailed ContentProvider, Application and Activity startup times

        Parameters:
        enablePerformanceV2 - true if enabled or false otherwise
      • setEnableStandaloneAppStartTracing

        @ApiStatus.Experimental() void setEnableStandaloneAppStartTracing(boolean enableStandaloneAppStartTracing)

        Enables or disables standalone app start tracing.

        When enabled, app start is sent as its own transaction instead of an {@code app.start.*} child span on the first Activity transaction.

        The SDK reports app start through these paths:

        • With an Activity: the SDK sends an "App Start" transaction with operation {@code * app.start}, plus a separate {@code ui.load} transaction for the Activity. Bothtransactions share the same trace ID.
        • Headless app start: for launches started by something like a broadcast receiver, service,or content provider without an Activity, the SDK sends only the standalone app-starttransaction.
          • On devices running Android 15 (API level 35) or newer, the SDK can use {@code * ApplicationStartInfo} to classify cold versus warm starts and anchor the end timeat the {@code Application.onCreate} start.
          • On devices running older Android versions, headless launches are treated as coldonce {@code Application.onCreate} finishes without an Activity. The end time fallsback to the best SDK/plugin timing available.
          • With {@code Application.onCreate} instrumentation, the SDK can add an {@code * application.load} phase span and use the exact {@code Application.onCreate} endtime. Without that instrumentation, the standalone transaction is still sent, butit may only include the {@code process.load} phase span.
        • If an Activity opens after a headless start, its {@code ui.load} transaction reuses theapp-start trace ID.
        Parameters:
        enableStandaloneAppStartTracing - true if enabled or false otherwise
      • setEnableAnrFingerprinting

         void setEnableAnrFingerprinting(boolean enableAnrFingerprinting)

        Sets whether ANR fingerprinting is enabled. When enabled, the SDK assigns static fingerprintsto ANR events that would otherwise produce noisy grouping. Currently, this applies a staticfingerprint to ANRs whose stacktraces contain only system frames and no application frames.

        Parameters:
        enableAnrFingerprinting - true to enable ANR fingerprinting
      • isAnrEnabled

         boolean isAnrEnabled()

        Checks if ANR (Application Not Responding) is enabled or disabled Default is enabled

      • isAnrReportInDebug

         boolean isAnrReportInDebug()

        Checks if ANR (Application Not Responding) is enabled or disabled on Debug mode Default isdisabled

      • isEnableNdkAppHangTracking

        @ApiStatus.Experimental() boolean isEnableNdkAppHangTracking()

        Checks if heartbeat-based app-hang detection in sentry-native is enabled. Default is disabled.

      • setTombstoneEnabled

         void setTombstoneEnabled(boolean enableTombstone)

        Sets Tombstone reporting (ApplicationExitInfo.REASON_CRASH_NATIVE) to enabled or disabled.

        Parameters:
        enableTombstone - true for enabled and false for disabled
      • isTombstoneEnabled

         boolean isTombstoneEnabled()

        Checks if Tombstone reporting (ApplicationExitInfo.REASON_CRASH_NATIVE) is enabled or disabledDefault is disabled

      • enableAllAutoBreadcrumbs

         void enableAllAutoBreadcrumbs(boolean enable)

        Enable or disable all the automatic breadcrumbs

        Parameters:
        enable - true if enable or false otherwise
      • isEnableNdk

         boolean isEnableNdk()

        Check if NDK is ON or OFF Default is ON

      • isEnableScopeSync

         boolean isEnableScopeSync()

        Returns if the Java to NDK Scope sync is enabled

      • isEnableAnrFingerprinting

         boolean isEnableAnrFingerprinting()

        Returns whether ANR fingerprinting is enabled. When enabled, the SDK assigns staticfingerprints to ANR events that would otherwise produce noisy grouping. Currently, this appliesa static fingerprint to ANRs whose stacktraces contain only system frames and no applicationframes.