Flutter Application Data Collection
Introduction
Flutter data collection depends on the Android and iOS native frameworks. To compare with Android and iOS data collection, items marked with strikethrough below are parts that have not been implemented.
Data Types
Guance's user access monitoring includes six types of data.
Type |
Description |
session |
User session information is recorded. During the current session, data related to user pages, resources, actions, errors, and long tasks will be captured based on session dimensions. |
view |
A view record is generated each time a user visits a page in the mobile application. When a user stays on the same page, resource, long task, error, and action records are linked to the relevant RUM view via the view_id attribute. |
resource |
Records of resources loaded when the user accesses a page. |
error |
Exceptions or crashes issued by the mobile application. |
long_task |
An event is generated for any task in the application that blocks the main thread for longer than a specified duration threshold. |
action |
Records user activities within the mobile application (app launch, clicks, swipes, back actions, etc.). Each action is attached with a unique action_id . |
Global Attributes
Scenarios and event alerts for user access monitoring can be queried using the following global attributes.
SDK Attributes
Field |
Type |
Description |
sdk_name |
string |
Collector name, fixed names:
df_macos_rum_sdk
df_linux_rum_sdk
df_windows_rum_sdk
df_web_rum_sdk
df_miniapp_rum_sdk
df_ios_rum_sdk
df_android_rum_sdk |
sdk_version |
string |
Collector version information |
Application Attributes
Field |
Type |
Description |
app_id |
string |
Required, unique ID for the monitored application, automatically generated when creating monitoring in Guance console. |
env |
string |
Required, environment field. Values: prod/gray/pre/common/local. Where: prod: Production environment gray: Gray release environment pre: Pre-release environment common: Daily environment local: Local environment |
version |
string |
Required, version number. |
service |
string |
Optional, name of the associated business or service. Fixed names:
df_rum_ios
df_rum_android
df_rum_windows
df_rum_linux |
User & Session Attributes
Field |
Type |
Description |
userid |
string |
For unlogged users, a random UUID is used as userid ; for logged-in users, the user ID generated by the app backend is used. |
user_name |
string |
Optional, user name. |
user_email |
string |
Optional, user email. |
session_id |
string |
Session ID, a new session_id is generated if no activity for more than 15 minutes. |
session_type |
string |
Session type. Reference values: user & synthetics user: Data generated by RUM functionality; synthetics: Data generated by headless tests. |
is_signin |
boolean |
Whether the user is registered, values: T & F. |
Device & Resolution Attributes
Field |
Type |
Description |
device |
string |
Mobile device manufacturer |
model |
string |
Mobile device model |
device_uuid |
string |
Unique ID of the mobile device, generated using Android:ANDROID_ID、iOS:UIDevice.identifierForVendor |
os |
string |
Operating system information |
os_version |
string |
Operating system version |
os_version_major |
string |
Major version of the operating system |
screen_size |
string |
Screen resolution |
Geographic & Network Attributes
Field |
Type |
Description |
ip |
string |
User IP address |
isp |
string |
ISP provider |
network_type |
string |
Network connection type, reference values: wifi & 2g & 3g & 4g & 5g & unknown (unknown network) & unreachable (unavailable network) |
country |
string |
Country |
country_iso_code |
string |
Country ISO code |
province |
string |
Province |
city |
string |
City |
Custom Attributes
In addition to global attributes, custom attributes (SDK supports user-defined tag data) can be used to build scenarios and configure event alerts. Custom attributes are non-global attributes. By using custom attributes, you can track the entire process of user access to the application, identify and discover affected user sessions, and monitor user access performance.
Other Data Type Attributes
Session
Properties
Field |
Type |
Description |
session_id |
string |
Session ID |
session_type |
string |
Session type. Reference values: user & test user: Data generated by RUM functionality; test: Data generated by headless tests. |
session_referrer |
string |
Session source, usually records the URL of the source page. |
session_first_view_id |
string |
view_id of the first page in the current session |
session_first_view_name |
string |
URL of the first page in the current session |
session_last_view_id |
string |
view_id of the last visited page in the current session |
session_last_view_name |
string |
URL of the last page in the current session |
Metrics
Field |
Type |
Description |
time_spent |
number(ns) |
Duration of the current session |
session_view_count |
number |
Number of associated view_id in the current session |
session_error_count |
number |
Number of errors in the current session |
session_resource_count |
number |
Number of resources loaded in the current session |
session_action_count |
number |
Number of user actions in the current session |
session_long_task_count |
number |
Number of long tasks in the current session |
View
Properties
Field |
Type |
Description |
view_id |
string |
Unique ID generated each time a page is visited |
view_referrer |
string |
Referring page, parent page |
view_name |
string |
Page name |
Action Properties
Field |
Type |
Description |
action_id |
string |
Unique ID generated when a user interacts with a page |
action_name |
string |
Action name |
action_type |
string |
Action type (cold/hot start, click, etc.) |
Metrics
Field |
Type |
Description |
loading_time |
number(ns) |
Loading time of the page |
time_spent |
number(ns) |
Time spent on the page |
is_active |
boolean |
Indicates whether the user is still active, values: true & false |
Statistics
Field |
Type |
Description |
view_error_count |
number |
Number of errors during page load |
view_resource_count |
number |
Number of resources requested during page load |
view_long_task_count |
number |
Number of long tasks during page load |
view_action_count |
number |
Number of actions performed while viewing the page |
Monitoring Metrics
Field |
Type |
Description |
cpu_tick_count |
number |
Optional, CPU tick count for the page |
cpu_tick_count_per_second |
number |
Optional, average CPU ticks per second |
fps_avg |
number |
Optional, average frames per second for the page |
fps_mini |
number |
Optional, minimum frames per second for the page |
memory_avg |
number |
Optional, average memory usage for the page |
memory_max |
number |
Optional, peak memory usage for the page |
Resource
View Properties
Field |
Type |
Description |
view_id |
string |
Unique ID generated each time a page is visited |
view_referrer |
string |
Referring page, parent page |
view_name |
string |
Page name |
Action Properties
Field |
Type |
Description |
action_id |
string |
Unique ID generated when a user interacts with a page |
action_name |
string |
Action name |
action_type |
string |
Action type (cold/hot start, click, etc.) |
Resource Properties
Field |
Type |
Description |
resource_url |
string |
Resource URL |
resource_url_host |
string |
Host part of the resource URL |
resource_url_path |
string |
Path part of the resource URL |
resource_url_query |
string |
Query part of the resource URL |
resource_url_path_group |
string |
Grouped path part of the resource URL |
resource_type |
string |
Category of the resource |
resource_method |
string |
HTTP method used for the request |
resource_status |
string |
Status code returned by the resource request |
resource_status_group |
string |
Grouped status code of the resource request |
Metrics
Field |
Type |
Description |
resource_size |
number |
Size of the resource, default unit: byte |
resource_dns |
number(ns) |
DNS lookup time for the resource Calculated as: domainLookupEnd - domainLookupStart |
resource_tcp |
number(ns) |
TCP connection time for the resource Calculated as: connectEnd - connectStart |
resource_ssl |
number(ns) |
SSL connection time for the resource Calculated as: connectEnd - secureConnectStart |
resource_ttfb |
number(ns) |
Time to first byte for the resource Calculated as: responseStart - requestStart |
resource_trans |
number(ns) |
Content transfer time for the resource Calculated as: responseEnd - responseStart |
resource_first_byte |
number(ns) |
First byte time for the resource Calculated as: responseStart - domainLookupStart |
duration |
number(ns) |
Total loading time for the resource Calculated as: responseEnd - startTime |
request_header |
string |
Request headers for the resource |
response_header |
string |
Response headers for the resource |
Error
View Properties
Field |
Type |
Description |
view_id |
string |
Unique ID generated each time a page is visited |
view_referrer |
string |
Referring page, parent page |
view_name |
string |
Page name |
Action Properties
Field |
Type |
Description |
action_id |
string |
Unique ID generated when a user interacts with a page |
action_name |
string |
Action name |
action_type |
string |
Action type (cold/hot start, click, etc.) |
Error Properties
Field |
Type |
Description |
error_source |
string |
Source of the error, reference values: logger & network |
error_type |
string |
Type of error logger error type: flutter_crash | java_crash | native_crash | anr_error | anr_crash | ios_crash network error type: network_error |
error_situation |
string |
Timing of the error occurrence, reference values: startup (during startup) and run (during runtime) |
When type=network, additional Network Error properties are added.
Field |
Type |
Description |
resource_status |
string |
Status code returned by the resource request |
resource_url |
string |
Resource URL |
resource_url_host |
string |
Host part of the resource URL |
resource_url_path |
string |
Path part of the resource URL |
resource_url_path_group |
string |
Grouped path part of the resource URL |
resource_method |
string |
HTTP method used for the request |
Error Monitoring Properties
Field |
Type |
Description |
memory_total |
string |
Optional, total memory |
memory_use |
number |
Optional, memory usage percentage |
cpu_use |
number |
Optional, CPU usage percentage |
battery_use |
number |
Optional, current battery level of the device |
locale |
string |
Current system language |
Metrics
Field |
Type |
Description |
error_message |
string |
Error message |
error_stack |
string |
Error stack trace |
Long Task
View Properties
Field |
Type |
Description |
view_id |
string |
Unique ID generated each time a page is visited |
view_referrer |
string |
Referring page, parent page |
view_name |
string |
Page name |
Action Properties
Field |
Type |
Description |
action_id |
string |
Unique ID generated when a user interacts with a page |
action_name |
string |
Action name |
action_type |
string |
Action type (cold/hot start, click, etc.) |
Metrics
Field |
Type |
Description |
duration |
number(ns) |
Duration of the blocking task |
long_task_message |
string |
Information about the blocking task |
long_task_stack |
string |
Stack trace of the blocking task |
Action
View Properties
Field |
Type |
Description |
view_id |
string |
Unique ID generated each time a page is visited |
view_referrer |
string |
Referring page, parent page |
view_name |
string |
Page name |
Action Properties
Field |
Type |
Description |
action_id |
string |
Unique ID generated when a user interacts with a page |
action_name |
string |
Action name |
action_type |
string |
Action type (cold/hot start, click, etc.) |
Metrics
Field |
Type |
Description |
duration |
number(ns) |
Time taken for the action |
Statistics
Field |
Type |
Description |
action_long_task_count |
number |
Number of long tasks associated with the action |
action_resource_count |
number |
Number of resource requests associated with the action |
action_error_count |
number |
Number of errors associated with the action |