Record Telemetry
This guide shows how to record your own telemetry entries in the SDK’s telemetry channel with Apolo.logger, keeping your diagnostic trail in the same place as the SDK’s own events.
How it works
Each call records a telemetry entry in the SDK channel — it does not write to Logcat. The calls are always safe: when the telemetry channel is not active in the current session, the call becomes a silent no-op. It never throws and never blocks the caller.
val Apolo.logger: ApoloLogger
interface ApoloLogger {
fun d(tag: String, message: String)
fun i(tag: String, message: String)
fun w(tag: String, message: String)
fun e(tag: String, message: String, throwable: Throwable? = null)
}Only the e (error) level accepts an optional Throwable, since stack traces are meaningful for failures.
Record an entry
val apolo = ApoloSdk.getClient()
apolo.logger.i(tag = "Checkout", message = "starting a credit sale")
runCatching { /* ... */ }.onFailure { err ->
apolo.logger.e(tag = "Checkout", message = "failed to prepare cart", throwable = err)
}Best practices
- Standardize
tagby functional area of your application, to correlate with the SDK’s own telemetry. - Do not send sensitive data (card number, tax ID, credentials) through
logger— telemetry is for diagnostic tracing, not transactional payload.
Next steps
- Troubleshooting — turn a logged failure into a diagnosis and an action.
- Error codes reference — the result codes and cause categories your entries will reference.
English › Documentation › Documentation › In-Store Payments › Getnet Toolbox › SDK White Label › How-to Guides