Skip to main content

Custom events & traces

This page documents the Bugsee Android SDK 7.x. For the previous major version, see Adding custom data.

In addition to the data Bugsee captures automatically, you can enrich reports with your own signals. Custom events and traces live on the Bugsee facade and are safe to call before or after Bugsee.launch(...) — calls made before launch are buffered.

Custom events​

Events are identified by a string and can optionally carry a HashMap of parameters. They are attached to the report and indexed on the Bugsee dashboard.

// Without any additional parameters
Bugsee.event("payment_processed");

// ...or with additional custom parameters
HashMap<String, Object> params = new HashMap<>();
params.put("amount", 125);
params.put("currency", "USD");
Bugsee.event("event with params", params);

Custom traces​

Traces are useful when you want to track how a specific variable or state changes over time right before a problem occurs. Each call records a new value for the given trace name; the value can be a number, string, or boolean.

// Number value
Bugsee.trace("credit_balance", 15);

// String value
Bugsee.trace("current_location", "USA");

// Boolean value
Bugsee.trace("logged_in", true);

System traces​

Besides your own traces, every report carries traces that the SDK records on its own while it runs. They need no code and no option. Some depend on the device's Android version:

TraceWhat it showsAndroid version
CPUThe app process's CPU usage.All
MemoryJVM and native heap (total, free, used), the process's native, Dalvik, other and total memory, the device's total, available and advertised memory, and the low-memory state.All
PowerBattery level, charging state and source, and power saving.All
ConnectivityThe active connection type (Wi-Fi, cellular, Ethernet, Bluetooth and others).All
Wi-FiWhether Wi-Fi is on, RSSI and signal level, link speed and bandwidth, frequency, Passpoint provider names, the local IP address and the MAC address, and the network name (SSID) and BSSID. Recorded only if your app holds ACCESS_WIFI_STATE, which the SDK does not request. SSID and BSSID also need location permission; Passpoint names need Android 13 (API 33). The Wi-Fi standard and maximum link speeds need Android 11 (API 30), the security type Android 13 (API 33). No option turns these fields off.All
CellularPer SIM on Android 10 (API 29) and later: network type, data connection state, operator name, MCC and MNC, roaming state and signal strength.All
Bluetooth, NFCBluetooth and NFC state.All
App and screenForeground or background, the current activity, orientation, screen brightness, the connected displays, and accessibility state.All
Sound volumeVolume levels of six audio streams: media, voice call, system, ring, alarm and notification.All
CaptureWhether recording is active, in a blackout, or in a partial blackout (some displays blacked out).All
Frame rate, fold stateFrame rate; fold state on foldable devices.7.0 (API 24) and later
Hinge angleThe hinge angle, on foldable devices with a hinge-angle sensor.11 (API 30) and later
Thermal stateThe device's thermal status.10 (API 29) and later
Disk space, thermal headroomFree and total storage; thermal headroom.11 (API 30) and later
Game modeThe Android Game Mode the system applies to the app (unsupported for apps the system does not treat as games).12 (API 31) and later
SatelliteWhether the satellite modem is on. Needs a phone-state permission that the SDK does not request; without one the trace reports it as unavailable. Reads unknown until the modem state first changes.16 (API 36) and later
Found an issue, typo, or wrong statement on this page? Report it now →