Web Application Data Collection¶
Overview¶
After collecting application data and reporting it to the guance, you can customize the configuration scene and configure anomaly detection events through the Guance console.
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 |
The Real User Monitoring collector collects all front-end errors on the browser. |
long_task |
A long task record is generated for any task in the browser that blocks the main thread for more than 50ms. |
action |
Track all user interaction records during user page browsing. |
Hierarchical structure¶
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 |
User & Session Properties¶
Fields | Type | Description |
---|---|---|
userid |
string | User ID. The default is to get the browser cookie as userid. if you set the user id using Customized User Identification, then the userid will be consistent with the defined one. Note: Cookie expiration time is 60 days. |
session_id |
string | ID of the session. (A user session is considered expired if no interaction is generated within 15 minutes. ) |
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 |
---|---|---|
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 |
browser |
string | Browser provider |
browser_version |
string | Browser version |
browser_version_major |
string | Browser major version |
screen_size |
string | Screen size |
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 user session is considered expired if no interaction is generated within 15 minutes. ) |
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_url |
string | URL of the first page of the current session |
session_first_view_host |
string | The domain name of the first page of the current session |
session_first_view_path |
string | The address of the first page of the current session |
session_first_view_path_group |
string | Address grouping of the first page of the current session |
session_first_view_url_query |
string | query information for 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_url |
string | URL of the last page of the current session |
session_last_view_host |
string | The domain name of the last page of the current session |
session_last_view_path |
string | The address of the last page of the current session |
session_last_view_path_group |
string | Address grouping of the last page of the current session |
session_last_view_url_query |
object | query information for 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_loading_type |
string | The type of page load. e.g. initial_load/route_change |
view_referrer |
string | The URL of the previous web page from which a link to the currently requested page was followed. |
view_url |
string | The view URL. |
view_host |
string | The host part of the URL. |
view_path |
string | The path part of the URL. |
view_path_group |
string | The automatic URL group generated for similar URLs |
view_url_query |
string | The query string parts of the URL decomposed as query params key/value attributes. |
Metrics¶
Fields | Type | Description |
---|---|---|
first_contentful_paint | number(ns) | The browser first render time (FCP). Unit: ns Calculation: firstPaintContentEnd - firstPaintContentStart |
largest_contentful_paint | number(ns) | Time in the page load where the largest DOM object in the viewport is rendered. e.g. LCP Calculation: Counting the most recently reported PerformanceEntry time |
cumulative_layout_shift | number | Quantifies unexpected page movement due to dynamically loaded content where 0 means that no shifts are happening. |
first_input_delay | number(ns) | Time elapsed between a user’s first interaction with the page and the browser’s response. Unit: ns Calculation: performance.now() - event.timeStamp |
loading_time | number(ns) | Time until the page is ready and no network request or DOM mutation is currently occurring. Unit: ns Calculation formula in initial_load mode: ① loadEventEnd - navigationStart ② Page first inactivity time - navigationStart Calculation formula in route_change mode: User click time - Page first inactivity time Page first inactivity time: page more than 100ms without network request or DOM mutation |
dom_interactive | number(ns) | Time until the parser finishes its work on the main document. Unit: ns time = performanceTiming.domInteractive e.g. MDN dom_interactive |
dom_content_loaded | number(ns) | DOM content load time Unit: ns Calculation: domContentLoadedEventEnd - domContentLoadedEventStart |
dom_complete | number(ns) | Time until the page and all of the subresources are ready. Unit: ns time = performanceTiming.domComplete; e.g. MDN dom_complete |
load_event | number(ns) | event load time Unit: ns Calculation: loadEventEnd - loadEventStart |
first_meaningful_paint | number(ns) | Time when the browser first renders any text, image, non-white canvas, or SVG. Unit: ns Calculation: firstPaintContentEnd - firstPaintContentStart |
first_paint_time | number(ns) | First rendering time Unit: ns Calculation: responseEnd - fetchStart |
resource_load_time | number(ns) | Resource loading time Unit: ns Calculation: loadEventStart - domContentLoadedEventEnd |
time_to_interactive | number(ns) | First Interaction Available Time Unit: ns Calculation: domInteratice - requestStart |
dom | number(ns) | DOM parsing time consumption Unit: ns Calculation: domComplete - domInteractive |
dom_ready | number(ns) | DOM ready time Unit: ns Calculation: domContentLoadedEventEnd - navigationStart |
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. |
view_apdex_level |
number | Page Apdex Satisfaction. Base metric: first_paint_time (converted to units of seconds)Reference: 0/1/2/3/4/5/6/7/8/9 (based on first_paint_time value, 9 means >= 9 seconds) |
Resource¶
View Properties¶
Fields | Type | Description |
---|---|---|
view_id |
string | Unique ID for each page view. |
is_active |
boolean | Judge whether the user is still active. |
view_loading_type |
string | The type of page load. e.g. initial_load/route_change |
view_referrer |
string | The URL of the previous web page from which a link to the currently requested page was followed. |
view_url |
string | The view URL. |
view_host |
string | The host part of the URL. |
view_path |
string | The path part of the URL. |
view_path_group |
string | The automatic URL group generated for similar URLs. |
view_url_query |
string | The query string parts of the URL decomposed as query params key/value attributes. |
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) |
Error¶
View Properties¶
Fields | Type | Description |
---|---|---|
view_id |
string | Unique ID for each page view. |
is_active |
boolean | Judge whether the user is still active. |
view_loading_type |
string | The type of page load. e.g. initial_load/route_change |
view_referrer |
string | The URL of the previous web page from which a link to the currently requested page was followed. |
view_url |
string | The view URL. |
view_host |
string | The host part of the URL. |
view_path |
string | The path part of the URL. |
view_path_group |
string | The automatic URL group generated for similar URLs. |
view_url_query |
string | The query string parts of the URL decomposed as query params key/value attributes. |
Error Properties¶
Fields | Type | Description |
---|---|---|
error_source |
string | Where the error originates from. e.g. console/network/source/custom/logger |
error_type |
string | The error type, e.g. error type |
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 |
Metrics¶
Fields | Type | Description |
---|---|---|
error_message |
string | error message |
error_stack |
string | The stack trace or complementary information about the error. |
Long Task¶
View Properties¶
Fields | Type | Description |
---|---|---|
view_id |
string | Unique ID for each page view. |
is_active |
boolean | Judge whether the user is still active. |
view_loading_type |
string | The type of page load. e.g. initial_load/route_change |
view_referrer |
string | The URL of the previous web page from which a link to the currently requested page was followed. |
view_url |
string | The view URL. |
view_host |
string | The host part of the URL. |
view_path |
string | The path part of the URL. |
view_path_group |
string | The automatic URL group generated for similar URLs. |
view_url_query |
string | The query string parts of the URL decomposed as query params key/value attributes. |
Metrics¶
Fields | Type | Description |
---|---|---|
duration |
number(ns) | Long task spend time generated on page load. |
Action¶
View Properties¶
Fields | Type | Description |
---|---|---|
view_id |
string | Unique ID for each page view. |
is_active |
boolean | Judge whether the user is still active. |
view_loading_type |
string | The type of page load. e.g. initial_load/route_change |
view_referrer |
string | The URL of the previous web page from which a link to the currently requested page was followed. |
view_url |
string | The view URL. |
view_host |
string | The host part of the URL. |
view_path |
string | The path part of the URL. |
view_path_group |
string | The automatic URL group generated for similar URLs. |
view_url_query |
string | The query string parts of the URL decomposed as query params key/value. attributes. |
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. |
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. |