Skip to main content

Advanced Configuration

SDK Log Level

For debugging and troubleshooting only. The SDK is silent by default (NONE) and should stay that way in production — logs may include internal URLs, queue sizes, and session identifiers.

import com.pulse.android.sdk.PulseSDK
import com.pulse.android.api.otel.PulseDataCollectionConsent
import com.pulse.utils.PulseLogLevel

PulseSDK.INSTANCE.initialize(
application = this,
apiKey = "your-api-key",
dataCollectionState = PulseDataCollectionConsent.ALLOWED,
logLevel = PulseLogLevel.DEBUG, // dev only — remove before release
)

Logcat filter: adb logcat -s "PulseSDK:*"

LevelWhat you see
VERBOSEInternal event matching, render paths, replay payloads
DEBUGExport latency, queue depth, config fetch, endpoint URLs
INFOSession start/end, SDK init duration, consent changes
WARNExport failures, queue overflows, recoverable errors
ERRORUnrecoverable errors with stack traces
NONESilent — default
warning

Never ship with logLevel set to anything other than NONE. Gate it behind BuildConfig.DEBUG if you want it on automatically in debug builds:

logLevel = if (BuildConfig.DEBUG) PulseLogLevel.DEBUG else PulseLogLevel.NONE,

StrictMode

SDK initialization may trigger StrictMode violations for disk/network I/O on the main thread during startup. These are expected and resolve after initialization. You can safely allowlist the Pulse initialization call in debug builds.

Next Steps