Skip to main content
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:
MetricDescriptionMeasurement Range
cold_start_durationCold start durationFrom app process creation to first Activity render complete
warm_start_durationWarm start durationApp process exists, from Activity start to render complete
hot_start_durationHot start durationApp and Activity both in memory, from resume to render complete
activity_start_durationActivity start durationFrom onCreate to first frame draw complete
is_pre_warmedPre-warmed start indicatorBoolean, indicates if app started via pre-warming (Android 11+)
Startup Type Descriptions:
  • Cold Start - App first launch or launch after process terminated, needs to load all resources and initialize app state
  • Warm Start - App process in memory, but Activity needs to be recreated
  • Hot Start - App and Activity both in memory, only needs to bring Activity to foreground

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:
StrategyDescriptionUse Case
ActivityViewTrackingStrategyTrack based on Activity lifecycleTraditional Activity architecture
FragmentViewTrackingStrategyTrack based on Fragment lifecycleFragment-centric apps
MixedViewTrackingStrategyTrack both Activities and FragmentsMixed architecture apps
NavigationViewTrackingStrategyFor Jetpack Navigation componentApps using Navigation
You can also customize View tracking by manually calling RumMonitor.startView() and RumMonitor.stopView().

Default Attributes

RUM SDK automatically attaches default attributes to all events, helping you understand user devices, network status, and app context.
AttributeTypeDescription
application.idstringFlashcat application ID
application.namestringApp package name (e.g., com.example.app)
application.versionstringApp version name
application.buildstringApp build version number
session.idstringUnique session ID for grouping events in user journey
session.typestringSession type: user
view.idstringUnique ID generated for each View
view.urlstringNormalized View URL (Activity or Fragment class name)
view.namestringCustomizable View name
envstringApp environment name (e.g., prod, dev)
servicestringService name, used to distinguish different app modules or microservices
versionstringApp version
sdk_versionstringFlashcat SDK version
datenumberEvent timestamp (epoch milliseconds)
typestringEvent type (e.g., view, resource, action, error, long_task)
The following device-related attributes are automatically collected in all RUM events:
AttributeTypeDescription
device.typestringDevice type, e.g., mobile, tablet, tv
device.namestringDevice commercial name (e.g., Samsung Galaxy S21)
device.modelstringDevice model (e.g., SM-G991B)
device.brandstringDevice brand (e.g., Samsung)
device.architecturestringDevice architecture (e.g., arm64-v8a)
device.marketing_namestringDevice marketing name
The following network-related attributes are automatically collected in all RUM events:
AttributeTypeDescription
connectivity.statusstringDevice network reachability status (connected, not_connected, maybe)
connectivity.interfacesarrayList of available network interfaces (e.g., wifi, cellular, ethernet)
connectivity.cellular.technologystringCellular network technology type (e.g., LTE, 5G)
connectivity.cellular.carrier_namestringCarrier name
The following OS-related attributes are automatically collected in all RUM events:
AttributeTypeDescription
os.namestringOperating system name (e.g., Android)
os.versionstringOperating system version (e.g., 13)
os.version_majorstringOperating system major version (e.g., 13)
os.buildstringSystem build number (e.g., TQ2A.230505.002)
Flashcat RUM can infer geographic location information from user’s IP address:
AttributeTypeDescription
geo.countrystringCountry name
geo.country_isostringCountry ISO code
geo.citystringCity name
Geo-location information is inferred by Flashcat backend based on client IP address. Precise GPS location is not collected on the client.
You can set user information via the setUser() API, which will be attached to all RUM events:
AttributeTypeDescription
usr.idstringUser’s unique identifier
usr.namestringUser’s friendly name
usr.emailstringUser’s email address
You can also add custom user attributes such as usr.plan, usr.role, etc.

Event-Specific Attributes

In addition to default attributes, different types of RUM events collect specific metrics and attributes.
AttributeTypeDescription
session.idstringUnique session ID
session.typestringSession type: user
session.has_replayboolWhether session includes session replay recording
session.is_activeboolWhether session is active
View events include the following specific attributes and performance metrics:
AttributeTypeDescription
view.idstringUnique ID for each View
view.namestringCustom View name
view.urlstringView URL (Activity or Fragment class name)
view.time_spentnumber(ns)Time user spent on this View
view.loading_timenumber(ns)Time for View to finish loading
view.loading_typestringView loading type: initial_load, activity_display, fragment_display
view.first_contentful_paintnumber(ns)First Contentful Paint time (API 29+ only)
view.action.countnumberNumber of all actions collected in View
view.resource.countnumberNumber of all resources collected in View
view.error.countnumberNumber of all errors collected in View
view.long_task.countnumberNumber of all long tasks collected in View
view.crash.countnumberNumber of all crashes collected in View
view.is_activeboolWhether View is still active
Resource events represent network requests in the app. Collected attributes include:
AttributeTypeDescription
resource.idstringResource unique identifier
resource.typestringResource type (e.g., xhr, fetch, image, css, js, font, media, other)
resource.urlstringResource URL
resource.methodstringHTTP method (e.g., GET, POST)
resource.status_codenumberHTTP response status code
resource.durationnumber(ns)Total time spent loading resource
resource.sizenumberResource size (bytes)
resource.dns.durationnumber(ns)DNS resolution time (domainLookupEnd - domainLookupStart)
resource.connect.durationnumber(ns)Connection establishment time (connectEnd - connectStart)
resource.ssl.durationnumber(ns)TLS handshake time (connectEnd - secureConnectionStart), HTTPS only
resource.first_byte.durationnumber(ns)Time waiting for first byte response (responseStart - requestStart)
resource.download.durationnumber(ns)Response download time (responseEnd - responseStart)
resource.redirect.durationnumber(ns)Time spent on subsequent HTTP redirects (redirectEnd - redirectStart)
resource.provider.namestringResource provider name, defaults to unknown
resource.provider.domainstringResource provider domain
resource.provider.typestringResource provider type (e.g., first-party, cdn, ad, analytics)
Error events collect exception and crash information. Error messages and stack traces are automatically included:
AttributeTypeDescription
error.sourcestringError source (e.g., webview, logger, network, source, console)
error.typestringError type or error code
error.messagestringConcise, human-readable one-line error message
error.stackstringStack trace or supplementary error information
error.issue_idstringError issue unique identifier
error.categorystringError high-level classification, possible values: ANR (Application Not Responding), Exception
error.filestringFilename where error occurred (for error tracking issues)
error.linenumberLine number where error occurred
error.is_crashboolIndicates if this error caused app crash
Network Errors:Network errors contain information about failed HTTP requests and collect the following attributes:
AttributeTypeDescription
error.resource.status_codenumberHTTP response status code
error.resource.methodstringHTTP method (e.g., POST, GET)
error.resource.urlstringResource URL
error.resource.provider.namestringResource provider name, defaults to unknown
error.resource.provider.domainstringResource provider domain
error.resource.provider.typestringResource provider type (e.g., first-party, cdn, ad, analytics)
Actions represent user interactions with the app (e.g., clicks, swipes, scrolls).Timing Attributes:
AttributeTypeDescription
action.loading_timenumber(ns)Action loading time
action.long_task.countnumberNumber of all long tasks collected for this action
action.resource.countnumberNumber of all resources collected for this action
action.error.countnumberNumber of all errors collected for this action
Basic Attributes:
AttributeTypeDescription
action.idstringUser action UUID
action.typestringUser action type (e.g., tap, scroll, swipe, application_start)
action.namestringUser action name
action.target.namestringElement 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:
/data/data/<package_name>/cache/com.flashcat.rum/
Security Protection:
  • Cache folder is protected by Android app sandbox
  • On most devices, other apps cannot read this data
Security Notes:
  • If mobile device is rooted or Linux kernel is tampered with, stored data may become readable
  • Sensitive data should not be included in RUM events, or should be obfuscated or filtered via EventMapper before sending

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

1

Event Collection

SDK appends uncompressed events to batch files using TLV encoding format (Tag-Length-Value).
2

Batch Optimization

When batch closes:
  • Read batch file and extract events
  • Deduplicate RUM events (remove redundant View events)
  • Build payload specific to each trace
3

Compressed Upload

Use gzip compression to reduce network traffic and upload time.

Upload Triggers

Batches are uploaded when any of the following occurs:
TriggerDescription
File SizeBatch file size reaches threshold (e.g., 4MB)
Event CountNumber of events in batch reaches threshold
App StateApp switches to background
Timed UploadPeriodic 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:
Data captured before device unlock will not be recorded because credential-encrypted storage is not yet available.
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.