Flashduty Docs
中文English
RoadmapAPI官网控制台
中文English
RoadmapAPI官网控制台
  1. Android
  • Introduction
  • On-call
    • Getting Started
      • Quick start
      • FAQ
      • Product Comparison
    • Incidents
      • What is an Incident
      • View Incidents
      • Handle Incidents
      • Escalations and Assignments
      • Custom Fields
      • Custom Actions
      • Alert Noise Reduction
      • Past Incidents
      • Outlier Incidents
      • Status Pages
    • Configure On-call
      • Channels
      • Integrate Alerts
      • Alert Noise Reduction
      • Escalation Rules
      • Label Enrichment
      • Schedules
      • Templates
      • Service Calendars
      • Preferences
      • Alert Routing
      • Silence and Inhibition
      • Filters
      • Notifications
      • Alert Pipeline
    • Advanced Features
      • Referencing Variables
      • Dynamic Assignment
      • Insights
      • War-room
    • Integrations
      • Alerts integration
        • Standard Alert Integration
        • Email Integration
        • Nightingale/FlashCat Integration
        • Prometheus Integration
        • Grafana Integration
        • Zabbix Integration
        • Uptime Kuma Integration
        • Alibaba Cloud ARMS Integration
        • Alibaba Cloud Monitor CM Event Integration
        • Alibaba Cloud Monitor CM Metrics Integration
        • Alibaba Cloud SLS Integration
        • AWS CloudWatch Integration
        • Azure Monitor Integration
        • Baidu Cloud BCM Integration
        • Huawei Cloud CES Integration
        • Influxdata Integration
        • Open Falcon Integration
        • PagerDuty Integration
        • Tencent BlueKing Integration
        • Tencent Cloud CLS Integration
        • Tencent Cloud Monitor CM Integration
        • Tencent Cloud EventBridge
        • OceanBase Integration
        • Graylog Integration
        • Skywalking Integration
        • Sentry Integration
        • Jiankongbao Integration
        • AWS EventBridge Integration
        • Dynatrace Integration
        • Huawei Cloud LTS Integration
        • GCP Integration
        • Splunk Alert Events Integration
        • AppDynamics Alert Integration
        • SolarWinds Alert Events Integration
        • Volcengine CM Alert Events Integration
        • Volcengine CM Event Center Integration
        • Volcengine TLS Integration
        • OpManager Integration
        • Meraki Integration
        • Keep Integration
        • ElastAlert2 Alert Integration
        • StateCloud Alert Events
        • Guance Alert Events
        • Zilliz Alert Events
        • Huawei Cloud APM Alerts
        • zstack integration
        • Monit Alert Integration
        • RUM Alert Integration
      • Change integration
        • Standard Change Event
        • Jira Issue Events
      • IM integration
        • Feishu (Lark) Integration Guide
        • Dingtalk Integration
        • WeCom Integration
        • Slack Integration
        • Microsoft Teams Integration
      • Single Sign-On
        • Authing Integration
        • Keycloak Guide
        • OpenLDAP Guide
      • Webhooks
        • Alert webhook
        • Incident webhook
        • Costom action
        • ServiceNow Sync
        • Jira Sync
      • Other
        • Link Integration
  • RUM
    • Getting Started
      • Application Management
      • Introduction
      • Quick Start
    • SDK Integration
      • Android
        • Data Collection
        • SDK Integration
        • Advanced Configuration
        • Compatibility
      • iOS
        • Data Collection
        • Compatibility
        • SDK Integration
        • Advanced Configuration
      • Web
        • Data Collection
        • SDK Integration
        • FAQ
        • Advanced Configuration
        • Compatibility
    • Session Explorer
      • Overview
      • Data Query
    • Analysis Dashboard
      • Web
      • Native
    • Performance Monitoring
      • Metrics
      • Performance Optimize
      • Overview
      • Performance Analysis
    • Error Tracking
      • Issues
      • Error Grouping
      • Source Mapping
      • Overview
      • Issue Status
      • Issue Alerting
      • Error Reporting
        • iOS
        • Android
        • Web
    • Best Practice
      • Distributed Tracing
    • Session Replay
      • View Session Replay
      • SDK Configuration
      • Overview
      • Privacy Protection
    • Others
      • Data Collection
      • Terminology
      • Data Security
  • Monitors
    • Getting Started
      • Introduction
      • Quick Start
    • Alert Rules
      • Prometheus
      • ElasticSearch
      • Loki
      • ClickHouse
      • MySQL
      • Oracle
      • PostgreSQL
      • Aliyun SLS
      • VictoriaLogs
    • FAQ
      • FAQ
  • Platform
    • Teams and Members
    • Permissions
    • Single Sign-On
  • Terms
    • Terms of Service
    • User Agreement/Privary Policy
    • SLA
    • Data Security
中文English
RoadmapAPI官网控制台
中文English
RoadmapAPI官网控制台
  1. Android

Data Collection

Overview#

Flashcat Android RUM SDK collects multiple metrics and attributes by default for all RUM events. You can also add custom attributes to extend the default data set.

Application Startup#

Flashcat collects the following metrics from app startup:
MetricDescription
cold_start_durationCold start duration: time from app process creation to first Activity rendering completion.
warm_start_durationWarm start duration: app process already exists, time from Activity start to rendering completion.
hot_start_durationHot start duration: both app and Activity are in memory, time from Activity resume to rendering completion.
activity_start_durationActivity start duration: time from onCreate to first frame rendering completion.
is_pre_warmedBoolean indicating whether the app was started through pre-warming (Android 11+).
Startup type descriptions:
Cold start: First launch of the app or launch after process termination. Requires loading all resources and initializing app state.
Warm start: App process is in memory, but Activity needs to be recreated.
Hot start: Both app and Activity are in memory, only need to bring Activity to foreground.

View Monitoring and App Lifecycle#

A View represents a unique screen that users see in the app. Each View start creates a new RUM event, which is updated throughout the View's lifecycle. Views collect information about all resources, actions, errors, and long tasks that occur during their lifecycle.
In Android, Activities and Fragments are considered Views. By default, the SDK uses the following strategies to automatically track Views:
ActivityViewTrackingStrategy: Tracks each Activity as a View based on Activity lifecycle.
FragmentViewTrackingStrategy: Tracks each Fragment as a View based on Fragment lifecycle.
MixedViewTrackingStrategy: Tracks both Activities and Fragments simultaneously.
NavigationViewTrackingStrategy: Tracking strategy for Jetpack Navigation component.
You can also manually call RumMonitor.startView() and RumMonitor.stopView() to customize View tracking.

Default Attributes#

Flashcat RUM SDK attaches the following default attributes to all events. These attributes help you understand user device, network status, and app context.

Common Core Attributes#

Attribute NameTypeDescription
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 used to group events in a user journey.
session.typestringSession type: user.
view.idstringUnique ID generated for each View.
view.urlstringNormalized URL of the View (Activity or Fragment class name).
view.namestringCustomizable View name.
envstringApp environment name (e.g., prod, dev).
servicestringService name used to distinguish different modules or microservices.
versionstringApp version.
sdk_versionstringFlashcat SDK version.
datenumberEvent timestamp (epoch milliseconds).
typestringEvent type (e.g., view, resource, action, error, long_task).

Device Attributes#

The following device-related attributes are automatically collected for all RUM events:
Attribute NameTypeDescription
device.typestringDevice type, such as mobile, tablet, tv, etc.
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_namestringMarketing name of the device.

Connectivity Attributes#

The following network-related attributes are automatically collected for all RUM events:
Attribute NameTypeDescription
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 (e.g., China Mobile).

Operating System Attributes#

The following OS-related attributes are automatically collected for all RUM events:
Attribute NameTypeDescription
os.namestringOperating system name (e.g., Android).
os.versionstringOperating system version (e.g., 13).
os.version_majorstringOS major version number (e.g., 13).
os.buildstringSystem build number (e.g., TQ2A.230505.002).

Geolocation Attributes#

Flashcat RUM can infer geolocation information from the user's IP address:
Attribute NameTypeDescription
geo.countrystringCountry name.
geo.country_isostringCountry ISO code.
geo.citystringCity name.
Note: Geolocation information is inferred by the Flashcat backend from the client IP address and does not collect precise GPS location on the client.

Global User Attributes#

You can set user information through the setUser() API, which will be attached to all RUM events:
Attribute NameTypeDescription
usr.idstringUnique user identifier.
usr.namestringUser-friendly name.
usr.emailstringUser email address.
You can also add custom user attributes, such as usr.plan, usr.role, etc.

Event-Specific Attributes#

Besides default attributes, different types of RUM events also collect specific metrics and attributes.

Session Attributes#

Attribute NameTypeDescription
session.idstringUnique session ID.
session.typestringSession type: user.
session.has_replayboolWhether the session includes session replay recording.
session.is_activeboolWhether the session is active.

View Attributes#

View events include the following specific attributes and performance metrics:
Attribute NameTypeDescription
view.idstringUnique ID for each View.
view.namestringCustom name for the View.
view.urlstringURL of the View (Activity or Fragment class name).
view.time_spentnumber(ns)Time spent by the user on this View.
view.loading_timenumber(ns)Time required for View loading to complete.
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.countnumberCount of all actions collected in the View.
view.resource.countnumberCount of all resources collected in the View.
view.error.countnumberCount of all errors collected in the View.
view.long_task.countnumberCount of all long tasks collected in the View.
view.crash.countnumberCount of all crashes collected in the View.
view.is_activeboolWhether the View is still active.

Resource Attributes#

Resource events represent network requests in the app. Collected attributes include:
Attribute NameTypeDescription
resource.idstringUnique identifier for the resource.
resource.typestringResource type (e.g., xhr, fetch, image, css, js, font, media, other).
resource.urlstringURL of the resource.
resource.methodstringHTTP method (e.g., GET, POST).
resource.status_codenumberHTTP response status code.
resource.durationnumber(ns)Total time spent loading the resource.
resource.sizenumberResource size (bytes).
resource.dns.durationnumber(ns)DNS resolution time (domainLookupEnd - domainLookupStart).
resource.connect.durationnumber(ns)Time to establish connection (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)Time downloading response (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 Attributes#

Frontend errors are collected through RUM, and error messages and stack traces (if available) are included:
Attribute NameTypeDescription
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 supplemental information about the error.
error.issue_idstringUnique identifier for the error issue.
error.categorystringHigh-level categorization of errors. Possible values: ANR, Exception.
error.filestringFile name where the error occurred (for error tracking issues).
error.linenumberLine number where the error occurred.
error.is_crashboolIndicates whether this error caused an app crash.

Network Errors#

Network errors include information about failed HTTP requests and collect the following attributes:
Attribute NameTypeDescription
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).

Action Timing Attributes#

Actions represent user interactions with the app (e.g., taps, swipes, scrolls).
Attribute NameTypeDescription
action.loading_timenumber(ns)Loading time for the action.
action.long_task.countnumberCount of all long tasks for this action.
action.resource.countnumberCount of all resources for this action.
action.error.countnumberCount of all errors for this action.

Action Attributes#

Attribute NameTypeDescription
action.idstringUUID for the user action.
action.typestringUser action type (e.g., tap, scroll, swipe, application_start).
action.namestringName of the user action.
action.target.namestringElement the user interacted with, only for automatically collected actions.

Data Storage#

Before data is uploaded to Flashcat, it is stored in plain text in the app's cache directory. This cache folder is protected by Android app sandboxing, meaning that on most devices, other apps cannot read this data. However, if the mobile device is rooted or someone tampers with the Linux kernel, stored data may become readable.
Storage location: /data/data/<package_name>/cache/com.flashcat.rum/
Note: Sensitive data should not be included in RUM events, or should be obfuscated or filtered before sending through the beforeSend callback.

Data Upload#

Flashcat RUM Android SDK considers user bandwidth impact while ensuring data transmission. The SDK uploads events in batches as follows:

Batching Mechanism#

1.
When collecting events:
Flashcat SDK appends uncompressed events to batch files (using TLV encoding format, Tag-Length-Value).
2.
When uploading (when a batch is considered "closed"):
Read batch file and extract events
Deduplicate RUM events (remove redundant View events; other traces are not optimized)
Build trace-specific payloads
Compress payloads and send

Upload Trigger Conditions#

Batches are uploaded under the following conditions:
Batch file size reaches threshold (e.g., 4MB)
Number of events in batch reaches threshold
App switches to background
Periodic upload (e.g., every 5 seconds)

Upload Strategy#

When network is available: Prioritize upload via WiFi, mobile network also supported.
When battery is sufficient: Ensure not to excessively consume device battery.
Retry on failure: If upload fails, batches are retained locally until successfully sent.

Data Compression#

Before upload, Flashcat SDK performs gzip compression on batch data to reduce network traffic and upload time.

Direct Boot Mode Support#

If your app supports Direct Boot mode (starts before device unlock), note that data captured before device unlock will not be recorded as 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 device encrypted storage is used instead of credential encrypted storage.

Further Reading#

Android SDK Integration Guide: Learn how to integrate the Android SDK
Android SDK Advanced Configuration: Learn how to configure advanced SDK features
RUM Analysis Dashboard: View and analyze RUM data

添加官方技术支持微信

在这里,获得使用上的任何帮助,快速上手FlashDuty

微信扫码交流
修改于 2026-01-16 08:33:40
上一页
Quick Start
下一页
SDK Integration
Built with