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:*"
| Level | What you see |
|---|---|
VERBOSE | Internal event matching, render paths, replay payloads |
DEBUG | Export latency, queue depth, config fetch, endpoint URLs |
INFO | Session start/end, SDK init duration, consent changes |
WARN | Export failures, queue overflows, recoverable errors |
ERROR | Unrecoverable errors with stack traces |
NONE | Silent — 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
- Troubleshooting — Common issues and solutions