Skip to main content

Configuration — Leak extension (7.x Beta)

7.x Beta

Leak detection is shipped as the bugsee-android-leak extension module. The core SDK doesn't include it — see Memory & thread leaks for installation.

The Leak extension exposes four runtime options: a master switch for each of memory and thread leak detection, plus two tuning knobs for the memory-leak mode and the deep-dump sample rate.

The programmatic constants live in the extension's own package:

import com.bugsee.library.leak.contracts.options.LeakOptions;
import com.bugsee.library.leak.MemoryLeakMode;

Memory leaks

ConstantManifest keyTypeDefault
LeakOptions.DetectMemoryLeakscom.bugsee.option.detect.memory_leaksbooleantrue (when module present)
LeakOptions.DetectMemoryLeaksModecom.bugsee.option.detect.memory_leaks.modeMemoryLeakModeFAST
LeakOptions.DetectMemoryLeaksDeepSampleRatecom.bugsee.option.detect.memory_leaks.deep_sample_ratefloat [0, 1]1.0

The manifest meta-data form accepts either the MemoryLeakMode enum constant name (FAST, DEEP_DEBUG_ONLY, DEEP_EVERYWHERE) or its camelCase wire alias (Fast, DeepDebugOnly, DeepEverywhere). The programmatic Bugsee.launch(...) map must use the typed enum value. See Memory & thread leaks → Modes for what each mode buys you.

<meta-data android:name="com.bugsee.option.detect.memory_leaks"
android:value="true" />
<meta-data android:name="com.bugsee.option.detect.memory_leaks.mode"
android:value="DEEP_DEBUG_ONLY" />
<meta-data android:name="com.bugsee.option.detect.memory_leaks.deep_sample_rate"
android:value="0.25" />

The deep-dump sample rate gates per-leak eligibility for the heap dump. The frequency caps and battery threshold still apply on top — a low sample rate compounds with them, so use it primarily to budget heap-dump cost on DEEP_EVERYWHERE.

Thread leaks

ConstantManifest keyTypeDefault
LeakOptions.DetectThreadLeakscom.bugsee.option.detect.thread_leaksbooleanfalse
<meta-data android:name="com.bugsee.option.detect.thread_leaks"
android:value="true" />

Thread-leak detection is off by default — see Memory & thread leaks → Thread leaks for why and when to flip it on.

Found an issue, typo, or wrong statement on this page? Report it now →