React Native Application Data Collection
Overview
React Native data collection relies on the Android iOS Native framework, and for comparison with Android iOS data collection, the following strikethrough tag items are not implemented.
Data Type
Real User Monitoring of Guance includes six data types.
Type |
Description |
session |
User session information records, in the current session, will be based on the session dimension of user pages, resources, actions, errors, long task related access data. |
view |
When a user accesses a page, a page view record is generated. When the user stays on the same page, the resource, long task, error, and action records are linked to the relevant RUM view through the view_id attribute. |
resource |
The resource information record loaded when the user accesses the page. |
error |
An exception or crash from a mobile application. |
long_task |
A long task event is generated for any task in the application that blocks the main thread beyond the specified duration threshold. |
action |
Record user activities in mobile applications (application launch, click, slide, back, etc.). Each action is attached with a unique action_id. |
Global Properties
Scenario construction and event alerts for Real User Monitoring can be queried through the following global properties.
SDK Properties
Fields |
Type |
Description |
sdk_name |
string |
Collector name.
df_web_rum_sdk
df_miniapp_rum_sdk
df_ios_rum_sdk
df_android_rum_sdk |
sdk_version |
string |
Integrations version |
Application Properties
Fields |
Type |
Description |
app_id |
string |
Required, The unique ID generated when you create a application. |
env |
string |
Required, Environment field. Attribute Value: prod/gray/pre/common/local. |
version |
string |
Required, Version |
service |
string |
Optional,The name of the business or service to which it belongs. Defaults:
df_rum_ios
df_rum_android |
User & Session Properties
Fields |
Type |
Description |
userid |
string |
User ID. Unlogged-in users use the cookie as the userid, and logged-in users use the userid generated in the application background. |
user_name |
string |
Optional, User name. |
user_email |
string |
Optional, User email. |
session_id |
string |
ID of the session. (A new session_id will be generated if the backend stays for more than 30s) |
session_type |
string |
Session Type. user: Data generated by RUM functionality. synthetics: headless data generated by dialing test. |
is_signin |
boolean |
Is it a registered user. |
Device & Resolution Properties
Fields |
Type |
Description |
device |
string |
Device |
model |
string |
Device model |
device_uuid |
string |
Device unique id |
os |
string |
The OS name as reported by the device |
os_version |
string |
The OS version as reported by the device |
os_version_major |
string |
The OS version major as reported by the device |
screen_size |
string |
Screen resolution |
Geographic & Network Properties
Fields |
Type |
Description |
ip |
string |
IP |
isp |
string |
ISP |
network_type |
string |
Network connection type, e.g. wifi/2g/3g/4g/5g, unknown/unreachable |
country |
string |
Country |
country_iso_code |
string |
Country iso code |
province |
string |
Province |
city |
string |
City |
Custom Properties
In addition to global properties, you can also build scenarios and configure event alerts through custom properties (*SDK supports users to type custom tag data *). Custom properties are non-global properties. Through custom properties, we can track the whole process of users accessing applications, locate and discover the affected access conditions of users, and monitor the access performance of users.
Other Data Type Properties
Session
Properties
Fields |
Type |
Description |
session_id |
string |
ID of the session. (A new session_id will be generated if the backend stays for more than 30s) |
session_type |
string |
Session Type. user: Data generated by RUM functionality. synthetics: headless data generated by dialing test. |
session_referrer |
string |
Session source. The page address used to record the source. |
session_first_view_id |
string |
The view_id of the first page of the current session |
session_first_view_name |
string |
URL of the first page of the current session |
session_last_view_id |
string |
The view_id of the last page visited by the current session |
session_last_view_name |
string |
URL of the last page of the current session |
Statistical Metrics
Fields |
Type |
Description |
time_spent |
number(ns) |
Duration of the user session. [Unit: ns] |
session_view_count |
number |
Count of all views collected for this session. |
session_error_count |
number |
Count of all errors collected for this session. |
session_resource_count |
number |
Count of all resources collected for this session. |
session_action_count |
number |
Count of all actions collected for this session. |
session_long_task_count |
number |
Count of all long tasks collected for this session. |
View
Properties
Fields |
Type |
Description |
view_id |
string |
Unique ID for each page view. |
view_referrer |
string |
The URL of the previous web page from which a link to the currently requested page was followed. |
view_name |
string |
View name |
Metrics
Fields |
Type |
Description |
loading_time |
number(ns) |
Page loading time |
time_spent |
number(ns) |
Page dwell time |
is_active |
boolean |
Judge whether the user is still active. |
Statistical Metrics
Fields |
Type |
Description |
view_error_count |
number |
Count of all errors collected for the view. |
view_resource_count |
number |
Count of all resources collected for the view. |
view_long_task_count |
number |
Count of all long tasks collected for the view. |
view_action_count |
number |
Count of all actions collected for the view. |
Monitor Metrics
Fields |
Type |
Description |
cpu_tick_count |
number |
Optional,CPU tick count for the view. |
cpu_tick_count_per_second |
number |
Optional,CPU ticks per second for the view. |
fps_avg |
number |
Optional,Average frames per second for the view. |
fps_mini |
number |
Optional,Minimum frames per second for the view. |
memory_avg |
number |
Optional,Average memory usage for the view. |
memory_max |
number |
Optional,Maximum memory for the view. |
Resource
View Properties
Fields |
Type |
Description |
view_id |
string |
Unique ID for each page view. |
view_referrer |
string |
The URL of the previous web page from which a link to the currently requested page was followed. |
view_name |
string |
View name |
Action Properties
Fields |
Type |
Description |
action_id |
string |
Unique ID for each page view. |
action_name |
string |
Action name |
action_type |
string |
Type of the user action. (Launch, Click action,etc) |
Resource Properties
Fields |
Type |
Description |
resource_url |
string |
The resource URL. |
resource_url_host |
string |
The host part of the URL. |
resource_url_path |
string |
The path part of the URL. |
resource_url_query |
string |
The query string parts of the URL decomposed as query params key/value attributes. |
resource_url_path_group |
string |
The path part of the URL group. |
resource_type |
string |
The type of resource being collected. |
resource_method |
string |
The HTTP method. e.g. POST/GET |
resource_status |
string |
The response status. |
resource_status_group |
string |
The response status code. |
Metrics
Fields |
Type |
Description |
resource_size |
number |
Resource size. Unit: ns |
resource_dns |
number(ns) |
Time spent resolving the DNS name of the last request. Unit: ns Calculation: domainLookupEnd - domainLookupStart |
resource_tcp |
number(ns) |
Time spent for the TCP handshake. Unit: ns Calculation: connectEnd - connectStart |
resource_ssl |
number(ns) |
Time spent for the TLS handshake. Unit: ns Calculation: connectEnd - secureConnectStart |
resource_ttfb |
number(ns) |
Time spenton on request response. Unit: ns Calculation: responseStart - requestStart |
resource_trans |
number(ns) |
Time spenton on content transfer. Unit: ns Calculation: responseEnd - responseStart |
resource_first_byte |
number(ns) |
Time spent waiting for the first byte of response to be received. Unit: ns Calculation: responseStart - domainLookupStart |
duration |
number(ns) |
Resource loading time. Calculation: duration(responseEnd-startTime) |
request_header |
string |
Resource request headers. |
response_header |
string |
Resource Response headers. |
Error
View Properties
Fields |
Type |
Description |
view_id |
string |
Unique ID for each page view. |
view_referrer |
string |
The URL of the previous web page from which a link to the currently requested page was followed. |
view_name |
string |
View name |
Action Properties
Fields |
Type |
Description |
action_id |
string |
Unique ID for each page view. |
action_name |
string |
Action name |
action_type |
string |
Type of the user action. (Launch, Click action,etc) |
Error Properties
Fields |
Type |
Description |
error_source |
string |
Where the error originates from. e.g. logger / network |
error_type |
string |
The error type. logger error type: java_crash | native_crash | abort | ios_crash network error type: |
error_situation |
string |
The timing of the mistake. e.g. startup / run |
When type=network, the following Network Error properties is added.
Fields |
Type |
Description |
resource_status |
string |
The response status. |
resource_url |
string |
The resource URL. |
resource_url_host |
string |
The host part of the URL. |
resource_url_path |
string |
The path part of the URL. |
resource_url_path_group |
string |
The path part of the URL group. |
resource_method |
string |
The HTTP method. e.g. POST/GET |
Error Monitor Metrics
Fields |
Type |
Description |
memory_total |
string |
Optional,Total memory. |
memory_use |
number |
Optional,Memory usage. |
cpu_use |
number |
Optional,CPU usage. |
battery_use |
number |
Optional,The current battery level of the phone. |
locale |
string |
Current system language. |
Metrics
Fields |
Type |
Description |
error_message |
string |
Error message. |
error_stack |
string |
Error stack. |
Long Task
View Properties
Fields |
Type |
Description |
view_id |
string |
Unique ID for each page view. |
view_referrer |
string |
The URL of the previous web page from which a link to the currently requested page was followed. |
view_name |
string |
View name. |
Action Attributes
Field |
Type |
Description |
action_id |
string |
Unique ID generated when the user operates on the page |
action_name |
string |
Operation name |
action_type |
string |
Operation type (hot and cold start, click click, etc.) |
Metrics
Fields |
Type |
Description |
duration |
number(ns) |
Carton duration |
long_task_message |
string |
Caton information |
long_task_stack |
string |
Caton stack |
Action
View Properties
Fields |
Type |
Description |
view_id |
string |
Unique ID for each page view. |
view_referrer |
string |
The URL of the previous web page from which a link to the currently requested page was followed. |
view_name |
string |
View name. |
Action Properties
Fields |
Type |
Description |
action_id |
string |
Unique ID generated when the user operates on the page. |
action_name |
string |
Action name |
action_type |
string |
Type of the user action. (Launch, Click action,etc) |
Metrics
Fields |
Type |
Description |
duration |
number(ns) |
Time spent on page operations. |
Statistical Metrics
Fields |
Type |
Description |
action_long_task_count |
number |
Number of operations associated with long tasks. |
action_resource_count |
number |
Number of requests to operate associated resources. |
action_error_count |
number |
Number of errors associated with the operation. |