# 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.

```kotlin
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

```kotlin
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 `tag` by 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](https://docs.globalgetnet.com/en/products/in-store-payments/getnet-toolbox?doc=sdk-wl-troubleshooting) — turn a logged failure into a diagnosis and an action.
* [Error codes reference](/en/getnet-toolbox/sdk-white-label/reference-sdk/error-codes) — the result codes and cause categories your entries will reference.