Flashduty Android RUM SDK automatically collects multiple metrics and attributes for all RUM events by default. You can also add custom attributes via API to extend the default dataset.
App Startup Metrics
Flashcat automatically collects the following app startup performance metrics:| Metric | Description | Measurement Range |
|---|---|---|
| cold_start_duration | Cold start duration | From app process creation to first Activity render complete |
| warm_start_duration | Warm start duration | App process exists, from Activity start to render complete |
| hot_start_duration | Hot start duration | App and Activity both in memory, from resume to render complete |
| activity_start_duration | Activity start duration | From onCreate to first frame draw complete |
| is_pre_warmed | Pre-warmed start indicator | Boolean, indicates if app started via pre-warming (Android 11+) |
Views Monitoring
A View represents a unique screen the user sees in the app. Each View creates a new RUM event when it starts, and updates that event throughout the View’s lifecycle.Views collect information about all resources, actions, errors, and long tasks that occur during their lifecycle.
Auto Tracking Strategies
In Android, Activities and Fragments are considered Views. The SDK provides the following auto tracking strategies:| Strategy | Description | Use Case |
|---|---|---|
| ActivityViewTrackingStrategy | Track based on Activity lifecycle | Traditional Activity architecture |
| FragmentViewTrackingStrategy | Track based on Fragment lifecycle | Fragment-centric apps |
| MixedViewTrackingStrategy | Track both Activities and Fragments | Mixed architecture apps |
| NavigationViewTrackingStrategy | For Jetpack Navigation component | Apps using Navigation |
Default Attributes
RUM SDK automatically attaches default attributes to all events, helping you understand user devices, network status, and app context.Core Attributes
Core Attributes
| Attribute | Type | Description |
|---|---|---|
application.id | string | Flashcat application ID |
application.name | string | App package name (e.g., com.example.app) |
application.version | string | App version name |
application.build | string | App build version number |
session.id | string | Unique session ID for grouping events in user journey |
session.type | string | Session type: user |
view.id | string | Unique ID generated for each View |
view.url | string | Normalized View URL (Activity or Fragment class name) |
view.name | string | Customizable View name |
env | string | App environment name (e.g., prod, dev) |
service | string | Service name, used to distinguish different app modules or microservices |
version | string | App version |
sdk_version | string | Flashcat SDK version |
date | number | Event timestamp (epoch milliseconds) |
type | string | Event type (e.g., view, resource, action, error, long_task) |
Device Attributes
Device Attributes
The following device-related attributes are automatically collected in all RUM events:
| Attribute | Type | Description |
|---|---|---|
device.type | string | Device type, e.g., mobile, tablet, tv |
device.name | string | Device commercial name (e.g., Samsung Galaxy S21) |
device.model | string | Device model (e.g., SM-G991B) |
device.brand | string | Device brand (e.g., Samsung) |
device.architecture | string | Device architecture (e.g., arm64-v8a) |
device.marketing_name | string | Device marketing name |
Connectivity Attributes
Connectivity Attributes
The following network-related attributes are automatically collected in all RUM events:
| Attribute | Type | Description |
|---|---|---|
connectivity.status | string | Device network reachability status (connected, not_connected, maybe) |
connectivity.interfaces | array | List of available network interfaces (e.g., wifi, cellular, ethernet) |
connectivity.cellular.technology | string | Cellular network technology type (e.g., LTE, 5G) |
connectivity.cellular.carrier_name | string | Carrier name |
Operating System Attributes
Operating System Attributes
The following OS-related attributes are automatically collected in all RUM events:
| Attribute | Type | Description |
|---|---|---|
os.name | string | Operating system name (e.g., Android) |
os.version | string | Operating system version (e.g., 13) |
os.version_major | string | Operating system major version (e.g., 13) |
os.build | string | System build number (e.g., TQ2A.230505.002) |
Geo-location Attributes
Geo-location Attributes
Flashcat RUM can infer geographic location information from user’s IP address:
| Attribute | Type | Description |
|---|---|---|
geo.country | string | Country name |
geo.country_iso | string | Country ISO code |
geo.city | string | City name |
Geo-location information is inferred by Flashcat backend based on client IP address. Precise GPS location is not collected on the client.
Global User Attributes
Global User Attributes
You can set user information via the
setUser() API, which will be attached to all RUM events:| Attribute | Type | Description |
|---|---|---|
usr.id | string | User’s unique identifier |
usr.name | string | User’s friendly name |
usr.email | string | User’s email address |
Event-Specific Attributes
In addition to default attributes, different types of RUM events collect specific metrics and attributes.Session Attributes
Session Attributes
| Attribute | Type | Description |
|---|---|---|
session.id | string | Unique session ID |
session.type | string | Session type: user |
session.has_replay | bool | Whether session includes session replay recording |
session.is_active | bool | Whether session is active |
View Attributes
View Attributes
View events include the following specific attributes and performance metrics:
| Attribute | Type | Description |
|---|---|---|
view.id | string | Unique ID for each View |
view.name | string | Custom View name |
view.url | string | View URL (Activity or Fragment class name) |
view.time_spent | number(ns) | Time user spent on this View |
view.loading_time | number(ns) | Time for View to finish loading |
view.loading_type | string | View loading type: initial_load, activity_display, fragment_display |
view.first_contentful_paint | number(ns) | First Contentful Paint time (API 29+ only) |
view.action.count | number | Number of all actions collected in View |
view.resource.count | number | Number of all resources collected in View |
view.error.count | number | Number of all errors collected in View |
view.long_task.count | number | Number of all long tasks collected in View |
view.crash.count | number | Number of all crashes collected in View |
view.is_active | bool | Whether View is still active |
Resource Attributes
Resource Attributes
Resource events represent network requests in the app. Collected attributes include:
| Attribute | Type | Description |
|---|---|---|
resource.id | string | Resource unique identifier |
resource.type | string | Resource type (e.g., xhr, fetch, image, css, js, font, media, other) |
resource.url | string | Resource URL |
resource.method | string | HTTP method (e.g., GET, POST) |
resource.status_code | number | HTTP response status code |
resource.duration | number(ns) | Total time spent loading resource |
resource.size | number | Resource size (bytes) |
resource.dns.duration | number(ns) | DNS resolution time (domainLookupEnd - domainLookupStart) |
resource.connect.duration | number(ns) | Connection establishment time (connectEnd - connectStart) |
resource.ssl.duration | number(ns) | TLS handshake time (connectEnd - secureConnectionStart), HTTPS only |
resource.first_byte.duration | number(ns) | Time waiting for first byte response (responseStart - requestStart) |
resource.download.duration | number(ns) | Response download time (responseEnd - responseStart) |
resource.redirect.duration | number(ns) | Time spent on subsequent HTTP redirects (redirectEnd - redirectStart) |
resource.provider.name | string | Resource provider name, defaults to unknown |
resource.provider.domain | string | Resource provider domain |
resource.provider.type | string | Resource provider type (e.g., first-party, cdn, ad, analytics) |
Error Attributes
Error Attributes
Error events collect exception and crash information. Error messages and stack traces are automatically included:
Network Errors:Network errors contain information about failed HTTP requests and collect the following attributes:
| Attribute | Type | Description |
|---|---|---|
error.source | string | Error source (e.g., webview, logger, network, source, console) |
error.type | string | Error type or error code |
error.message | string | Concise, human-readable one-line error message |
error.stack | string | Stack trace or supplementary error information |
error.issue_id | string | Error issue unique identifier |
error.category | string | Error high-level classification, possible values: ANR (Application Not Responding), Exception |
error.file | string | Filename where error occurred (for error tracking issues) |
error.line | number | Line number where error occurred |
error.is_crash | bool | Indicates if this error caused app crash |
| Attribute | Type | Description |
|---|---|---|
error.resource.status_code | number | HTTP response status code |
error.resource.method | string | HTTP method (e.g., POST, GET) |
error.resource.url | string | Resource URL |
error.resource.provider.name | string | Resource provider name, defaults to unknown |
error.resource.provider.domain | string | Resource provider domain |
error.resource.provider.type | string | Resource provider type (e.g., first-party, cdn, ad, analytics) |
Action Attributes
Action Attributes
Actions represent user interactions with the app (e.g., clicks, swipes, scrolls).Timing Attributes:
Basic Attributes:
| Attribute | Type | Description |
|---|---|---|
action.loading_time | number(ns) | Action loading time |
action.long_task.count | number | Number of all long tasks collected for this action |
action.resource.count | number | Number of all resources collected for this action |
action.error.count | number | Number of all errors collected for this action |
| Attribute | Type | Description |
|---|---|---|
action.id | string | User action UUID |
action.type | string | User action type (e.g., tap, scroll, swipe, application_start) |
action.name | string | User action name |
action.target.name | string | Element user interacted with, only for auto-collected actions |
Data Storage and Security
Local Storage Mechanism
Before data is uploaded to Flashcat, it is stored in plaintext in the app’s cache directory. Storage Location:Security Protection:
- Cache folder is protected by Android app sandbox
- On most devices, other apps cannot read this data
Data Upload Mechanism
Flashcat RUM Android SDK uses batch processing to upload events, ensuring data transmission while minimizing impact on user experience.Batch Processing Flow
Event Collection
SDK appends uncompressed events to batch files using TLV encoding format (Tag-Length-Value).
Batch Optimization
When batch closes:
- Read batch file and extract events
- Deduplicate RUM events (remove redundant View events)
- Build payload specific to each trace
Upload Triggers
Batches are uploaded when any of the following occurs:| Trigger | Description |
|---|---|
| File Size | Batch file size reaches threshold (e.g., 4MB) |
| Event Count | Number of events in batch reaches threshold |
| App State | App switches to background |
| Timed Upload | Periodic upload (e.g., every 5 seconds) |
Upload Strategy
Smart Upload Mechanism:
- Network Optimization - Prefer WiFi upload, mobile network also supported
- Battery Management - Ensures not to excessively drain device battery
- Failure Retry - Batches are retained locally on upload failure until successfully sent
- Data Compression - Uses gzip compression to reduce network traffic
Direct Boot Mode Support
If your app supports Direct Boot mode (launching before device unlock), note:Flashcat SDK will start collecting data after device unlock. If you need to collect data in Direct Boot mode, ensure you use device-encrypted storage instead of credential-encrypted storage.