-
public final class SentryAndroidOptions extends SentryOptionsSentry SDK options for Android
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSentryAndroidOptions.BeforeCaptureCallback
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SentryAndroidOptions()
-
Method Summary
Modifier and Type Method Description voidsetAnrEnabled(boolean anrEnabled)Sets ANR (Application Not Responding) to enabled or disabled Default is enabled longgetAnrTimeoutIntervalMillis()Returns the ANR timeout internal in Millis Default is 5000 = 5s voidsetAnrTimeoutIntervalMillis(long anrTimeoutIntervalMillis)Sets the ANR timeout internal in Millis Default is 5000 = 5s voidsetAnrReportInDebug(boolean anrReportInDebug)Sets ANR (Application Not Responding) to enabled or disabled on Debug mode Default is disabled voidsetEnableActivityLifecycleBreadcrumbs(boolean enableActivityLifecycleBreadcrumbs)voidsetEnableAppLifecycleBreadcrumbs(boolean enableAppLifecycleBreadcrumbs)voidsetEnableSystemEventBreadcrumbs(boolean enableSystemEventBreadcrumbs)voidsetEnableAppComponentBreadcrumbs(boolean enableAppComponentBreadcrumbs)voidsetEnableNetworkEventBreadcrumbs(boolean enableNetworkEventBreadcrumbs)voidsetEnableAutoActivityLifecycleTracing(boolean enableAutoActivityLifecycleTracing)voidsetEnableActivityLifecycleTracingAutoFinish(boolean enableActivityLifecycleTracingAutoFinish)IDebugImagesLoadergetDebugImagesLoader()Returns the Debug image loader voidsetDebugImagesLoader(@NotNull() IDebugImagesLoader debugImagesLoader)Sets the image loader voidsetAttachScreenshot(boolean attachScreenshot)voidsetAttachViewHierarchy(boolean attachViewHierarchy)voidsetCollectAdditionalContext(boolean collectAdditionalContext)longgetStartupCrashDurationThresholdMillis()Returns the Startup Crash duration threshold in Millis voidsetEnableFramesTracking(boolean enableFramesTracking)Enable or disable Frames Tracking, which is used to report slow and frozen frames. StringgetNativeSdkName()Returns the sdk name for the sentry native ndk module. voidsetNativeSdkName(@Nullable() String nativeSdkName)Sets the sdk name for the sentry-native ndk module. voidsetEnableRootCheck(boolean enableRootCheck)SentryAndroidOptions.BeforeCaptureCallbackgetBeforeScreenshotCaptureCallback()voidsetBeforeScreenshotCaptureCallback(@NotNull() SentryAndroidOptions.BeforeCaptureCallback beforeScreenshotCaptureCallback)Sets a callback which is executed before capturing screenshots. SentryAndroidOptions.BeforeCaptureCallbackgetBeforeViewHierarchyCaptureCallback()voidsetBeforeViewHierarchyCaptureCallback(@NotNull() SentryAndroidOptions.BeforeCaptureCallback beforeViewHierarchyCaptureCallback)Sets a callback which is executed before capturing view hierarchies. voidsetEnableNdk(boolean enableNdk)Sets NDK to ON or OFF voidsetEnableScopeSync(boolean enableScopeSync)Enables or not the Java to NDK Scope sync voidsetEnableAutoTraceIdGeneration(boolean enableAutoTraceIdGeneration)voidsetReportHistoricalAnrs(boolean reportHistoricalAnrs)voidsetAttachAnrThreadDump(boolean attachAnrThreadDump)voidsetEnablePerformanceV2(boolean enablePerformanceV2)Enables or disables the Performance V2 SDK features. SentryFrameMetricsCollectorgetFrameMetricsCollector()voidsetFrameMetricsCollector(@Nullable() SentryFrameMetricsCollector frameMetricsCollector)booleanisAnrEnabled()Checks if ANR (Application Not Responding) is enabled or disabled Default is enabled booleanisAnrReportInDebug()Checks if ANR (Application Not Responding) is enabled or disabled on Debug mode Default isdisabled booleanisEnableActivityLifecycleBreadcrumbs()booleanisEnableAppLifecycleBreadcrumbs()booleanisEnableSystemEventBreadcrumbs()booleanisEnableAppComponentBreadcrumbs()booleanisEnableNetworkEventBreadcrumbs()voidenableAllAutoBreadcrumbs(boolean enable)Enable or disable all the automatic breadcrumbs booleanisEnableAutoActivityLifecycleTracing()booleanisEnableActivityLifecycleTracingAutoFinish()booleanisAttachScreenshot()booleanisAttachViewHierarchy()booleanisCollectAdditionalContext()booleanisEnableFramesTracking()voidsetNativeHandlerStrategy(@NotNull() NdkHandlerStrategy ndkHandlerStrategy)booleanisEnableRootCheck()booleanisEnableNdk()Check if NDK is ON or OFF Default is ON booleanisEnableScopeSync()Returns if the Java to NDK Scope sync is enabled booleanisReportHistoricalAnrs()booleanisAttachAnrThreadDump()booleanisEnablePerformanceV2()booleanisEnableAutoTraceIdGeneration()-
Methods inherited from class io.sentry.SentryOptions
addBundleId, addContextTag, addEventProcessor, addIgnoredCheckIn, addIgnoredError, addIgnoredExceptionForType, addIgnoredSpanOrigin, addIgnoredTransaction, addInAppExclude, addInAppInclude, addIntegration, addOptionsObserver, addPerformanceCollector, addScopeObserver, empty, findPersistingScopeObserver, getBackpressureMonitor, getBeforeBreadcrumb, getBeforeEnvelopeCallback, getBeforeSend, getBeforeSendFeedback, getBeforeSendReplay, getBeforeSendTransaction, getBundleIds, getCacheDirPath, getClientReportRecorder, getCompositePerformanceCollector, getConnectionStatusProvider, getConnectionTimeoutMillis, getContextTags, getContinuousProfiler, getCron, getDateProvider, getDebugMetaLoader, getDefaultScopeType, getDiagnosticLevel, getDist, getDistinctId, getDsn, getEnvelopeDiskCache, getEnvelopeReader, getEnvironment, getEventProcessors, getExecutorService, getExperimental, getFatalLogger, getFlushTimeoutMillis, getFullyDisplayedReporter, getGestureTargetLocators, getIdleTimeout, getIgnoredCheckIns, getIgnoredErrors, getIgnoredExceptionsForType, getIgnoredSpanOrigins, getIgnoredTransactions, getInAppExcludes, getInAppIncludes, getInitPriority, getInstrumenter, getIntegrations, getInternalTracesSampler, getLogger, getLogs, getMaxAttachmentSize, getMaxBreadcrumbs, getMaxCacheItems, getMaxDepth, getMaxQueueSize, getMaxRequestBodySize, getMaxSpans, getMaxTraceFileSize, getModulesLoader, getOpenTelemetryMode, getOptionsObservers, getOutboxPath, getPerformanceCollectors, getProfileLifecycle, getProfileSessionSampleRate, getProfilesSampleRate, getProfilesSampler, getProfilingTracesDirPath, getProfilingTracesHz, getProguardUuid, getProxy, getReadTimeoutMillis, getRelease, getReplayController, getSampleRate, getScopeObservers, getSdkVersion, getSentryClientName, getSerializer, getServerName, getSessionFlushTimeoutMillis, getSessionReplay, getSessionTrackingIntervalMillis, getShutdownTimeoutMillis, getSocketTagger, getSpanFactory, getSpotlightConnectionUrl, getSslSocketFactory, getTags, getThreadChecker, getTracePropagationTargets, getTracesSampleRate, getTracesSampler, getTransactionProfiler, getTransportFactory, getTransportGate, getVersionDetector, getViewHierarchyExporters, isAttachServerName, isAttachStacktrace, isAttachThreads, isCaptureOpenTelemetryEvents, isContinuousProfilingEnabled, isDebug, isEnableAppStartProfiling, isEnableAutoSessionTracking, isEnableBackpressureHandling, isEnableDeduplication, isEnableExternalConfiguration, isEnablePrettySerializationOutput, isEnableScopePersistence, isEnableScreenTracking, isEnableShutdownHook, isEnableSpotlight, isEnableTimeToFullDisplayTracing, isEnableUncaughtExceptionHandler, isEnableUserInteractionBreadcrumbs, isEnableUserInteractionTracing, isEnabled, isForceInit, isGlobalHubMode, isPrintUncaughtStackTrace, isProfilingEnabled, isSendClientReports, isSendDefaultPii, isSendModules, isStartProfilerOnAppStart, isTraceOptionsRequests, isTraceSampling, isTracingEnabled, merge, setAttachServerName, setAttachStacktrace, setAttachThreads, setBackpressureMonitor, setBeforeBreadcrumb, setBeforeEnvelopeCallback, setBeforeSend, setBeforeSendFeedback, setBeforeSendReplay, setBeforeSendTransaction, setCacheDirPath, setCaptureOpenTelemetryEvents, setCompositePerformanceCollector, setConnectionStatusProvider, setConnectionTimeoutMillis, setContinuousProfiler, setCron, setDateProvider, setDebug, setDebugMetaLoader, setDefaultScopeType, setDiagnosticLevel, setDist, setDistinctId, setDsn, setEnableAppStartProfiling, setEnableAutoSessionTracking, setEnableBackpressureHandling, setEnableDeduplication, setEnableExternalConfiguration, setEnablePrettySerializationOutput, setEnableScopePersistence, setEnableScreenTracking, setEnableShutdownHook, setEnableSpotlight, setEnableTimeToFullDisplayTracing, setEnableUncaughtExceptionHandler, setEnableUserInteractionBreadcrumbs, setEnableUserInteractionTracing, setEnabled, setEnvelopeDiskCache, setEnvelopeReader, setEnvironment, setExecutorService, setFatalLogger, setFlushTimeoutMillis, setForceInit, setFullyDisplayedReporter, setGestureTargetLocators, setGlobalHubMode, setIdleTimeout, setIgnoredCheckIns, setIgnoredErrors, setIgnoredSpanOrigins, setIgnoredTransactions, setInitPriority, setInstrumenter, setLogger, setLogs, setMaxAttachmentSize, setMaxBreadcrumbs, setMaxCacheItems, setMaxDepth, setMaxQueueSize, setMaxRequestBodySize, setMaxSpans, setMaxTraceFileSize, setModulesLoader, setOpenTelemetryMode, setPrintUncaughtStackTrace, setProfileLifecycle, setProfileSessionSampleRate, setProfilesSampleRate, setProfilesSampler, setProfilingTracesHz, setProguardUuid, setProxy, setReadTimeoutMillis, setRelease, setReplayController, setSampleRate, setSdkVersion, setSendClientReports, setSendDefaultPii, setSendModules, setSentryClientName, setSerializer, setServerName, setSessionFlushTimeoutMillis, setSessionReplay, setSessionTrackingIntervalMillis, setShutdownTimeoutMillis, setSocketTagger, setSpanFactory, setSpotlightConnectionUrl, setSslSocketFactory, setStartProfilerOnAppStart, setTag, setThreadChecker, setTraceOptionsRequests, setTracePropagationTargets, setTraceSampling, setTracesSampleRate, setTracesSampler, setTransactionProfiler, setTransportFactory, setTransportGate, setVersionDetector, setViewHierarchyExporters -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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
-
getAnrTimeoutIntervalMillis
long getAnrTimeoutIntervalMillis()
Returns the ANR timeout internal in Millis Default is 5000 = 5s
-
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
-
setEnableActivityLifecycleBreadcrumbs
void setEnableActivityLifecycleBreadcrumbs(boolean enableActivityLifecycleBreadcrumbs)
-
setEnableAppLifecycleBreadcrumbs
void setEnableAppLifecycleBreadcrumbs(boolean enableAppLifecycleBreadcrumbs)
-
setEnableSystemEventBreadcrumbs
void setEnableSystemEventBreadcrumbs(boolean enableSystemEventBreadcrumbs)
-
setEnableAppComponentBreadcrumbs
void setEnableAppComponentBreadcrumbs(boolean enableAppComponentBreadcrumbs)
-
setEnableNetworkEventBreadcrumbs
void setEnableNetworkEventBreadcrumbs(boolean enableNetworkEventBreadcrumbs)
-
setEnableAutoActivityLifecycleTracing
void setEnableAutoActivityLifecycleTracing(boolean enableAutoActivityLifecycleTracing)
-
setEnableActivityLifecycleTracingAutoFinish
void setEnableActivityLifecycleTracingAutoFinish(boolean enableActivityLifecycleTracingAutoFinish)
-
getDebugImagesLoader
@NotNull() IDebugImagesLoader getDebugImagesLoader()
Returns the Debug image loader
-
setDebugImagesLoader
void setDebugImagesLoader(@NotNull() IDebugImagesLoader debugImagesLoader)
Sets the image loader
- Parameters:
debugImagesLoader- the image loader
-
setAttachScreenshot
void setAttachScreenshot(boolean attachScreenshot)
-
setAttachViewHierarchy
void setAttachViewHierarchy(boolean attachViewHierarchy)
-
setCollectAdditionalContext
void setCollectAdditionalContext(boolean collectAdditionalContext)
-
getStartupCrashDurationThresholdMillis
@ApiStatus.Internal() long getStartupCrashDurationThresholdMillis()
Returns the Startup Crash duration threshold 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
-
setEnableRootCheck
void setEnableRootCheck(boolean enableRootCheck)
-
getBeforeScreenshotCaptureCallback
@Nullable() SentryAndroidOptions.BeforeCaptureCallback getBeforeScreenshotCaptureCallback()
-
setBeforeScreenshotCaptureCallback
void setBeforeScreenshotCaptureCallback(@NotNull() SentryAndroidOptions.BeforeCaptureCallback beforeScreenshotCaptureCallback)
Sets a callback which is executed before capturing screenshots. Only relevant ifattachScreenshot is set to true.
- Parameters:
beforeScreenshotCaptureCallback- the callback to execute
-
getBeforeViewHierarchyCaptureCallback
@Nullable() SentryAndroidOptions.BeforeCaptureCallback getBeforeViewHierarchyCaptureCallback()
-
setBeforeViewHierarchyCaptureCallback
void setBeforeViewHierarchyCaptureCallback(@NotNull() SentryAndroidOptions.BeforeCaptureCallback beforeViewHierarchyCaptureCallback)
Sets a callback which is executed before capturing view hierarchies. Only relevant ifattachViewHierarchy is set to true.
- Parameters:
beforeViewHierarchyCaptureCallback- the callback to execute
-
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
-
setEnableAutoTraceIdGeneration
void setEnableAutoTraceIdGeneration(boolean enableAutoTraceIdGeneration)
-
setReportHistoricalAnrs
void setReportHistoricalAnrs(boolean reportHistoricalAnrs)
-
setAttachAnrThreadDump
void setAttachAnrThreadDump(boolean attachAnrThreadDump)
-
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
-
getFrameMetricsCollector
@ApiStatus.Internal()@Nullable() SentryFrameMetricsCollector getFrameMetricsCollector()
-
setFrameMetricsCollector
@ApiStatus.Internal() void setFrameMetricsCollector(@Nullable() SentryFrameMetricsCollector frameMetricsCollector)
-
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
-
isEnableActivityLifecycleBreadcrumbs
boolean isEnableActivityLifecycleBreadcrumbs()
-
isEnableAppLifecycleBreadcrumbs
boolean isEnableAppLifecycleBreadcrumbs()
-
isEnableSystemEventBreadcrumbs
boolean isEnableSystemEventBreadcrumbs()
-
isEnableAppComponentBreadcrumbs
boolean isEnableAppComponentBreadcrumbs()
-
isEnableNetworkEventBreadcrumbs
boolean isEnableNetworkEventBreadcrumbs()
-
enableAllAutoBreadcrumbs
void enableAllAutoBreadcrumbs(boolean enable)
Enable or disable all the automatic breadcrumbs
- Parameters:
enable- true if enable or false otherwise
-
isEnableAutoActivityLifecycleTracing
boolean isEnableAutoActivityLifecycleTracing()
-
isEnableActivityLifecycleTracingAutoFinish
boolean isEnableActivityLifecycleTracingAutoFinish()
-
isAttachScreenshot
boolean isAttachScreenshot()
-
isAttachViewHierarchy
boolean isAttachViewHierarchy()
-
isCollectAdditionalContext
boolean isCollectAdditionalContext()
-
isEnableFramesTracking
boolean isEnableFramesTracking()
-
setNativeHandlerStrategy
@ApiStatus.Internal() void setNativeHandlerStrategy(@NotNull() NdkHandlerStrategy ndkHandlerStrategy)
-
isEnableRootCheck
boolean isEnableRootCheck()
-
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
-
isReportHistoricalAnrs
boolean isReportHistoricalAnrs()
-
isAttachAnrThreadDump
boolean isAttachAnrThreadDump()
-
isEnablePerformanceV2
boolean isEnablePerformanceV2()
-
isEnableAutoTraceIdGeneration
boolean isEnableAutoTraceIdGeneration()
-
-
-
-