Skip to content

Web Application Data Collection


After application data is collected to Guance, you can perform custom configuration of scenarios and configure anomaly detection events through the Guance console.

Data Types

Guance's RUM includes six data types:

Type Description
session User session information records. Within the current session, user page, resource, operation, error, and long task related access data are captured based on the session dimension.
view A page view record is generated each time a user visits a page. 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 resource information loaded when a user visits a page.
error The RUM collector gathers all frontend errors from 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 Tracks all user interaction records during a user's page browsing session.

Global Attributes

Both scenario building and event alerting in RUM can be queried using the following global attributes.

SDK Attributes

Field Type Description
sdk_name string Collector name, fixed names:
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 identifier for the RUM application, automatically generated when creating a monitor in the Guance console.
env string Required. Environment field. Attribute values: prod/gray/pre/common/local. Where:
prod: Production environment;
gray: Gray environment;
pre: Pre-release environment;
common: Daily environment;
local: Local environment.
version string Required. Version number.
service string Required. The value corresponding to the service field configured within the RUM SDK.

User & Session Attributes

Field Type Description
userid string The browser Cookie is obtained by default as the userid. If a custom user identifier is used to set the user id, then userid will remain consistent with the definition.
❗️ Cookie expiration time is 60 days.
session_id string Session id (a user session is considered expired if no interaction occurs within 15 minutes).
session_type string Session type. Reference values: user & synthetics:
  • user: Data generated by the RUM feature;
  • synthetics: Data generated by headless synthetic tests.
  • is_signin boolean Whether it is a registered user, attribute values: True / False.

    Device & Resolution Attributes

    Field Type Description
    os string Operating system
    os_version string Operating system version
    os_version_major string Major OS version reported by the device
    browser string Browser provider
    browser_version string Browser version
    browser_version_major string Browser major version information
    screen_size string Screen width*height, resolution

    Geographic & Network Attributes

    Field Type Description
    ip string User access IP address
    isp string Internet Service Provider
    network_type string Network connection type, attribute values reference:
    wifi | 2g | 3g | 4g | 5g | unknown (unknown network) | unreachable (network unavailable)
    country string Country
    country_iso_code string Country iso_code
    province string Province
    city string City

    Custom Attributes

    In addition to global attributes, scenarios can be built and event alerts configured using custom attributes (The SDK supports users tagging custom data). Custom attributes are non-global attributes. Through custom attributes, you can track the entire process of user access to the application, locate and discover affected user access situations, and monitor user access performance.

    Other Data Type Attributes

    Session

    Attributes

    Field Type Description
    session_id string Session id (a user session is considered expired if no interaction occurs within 15 minutes)
    session_type string Session type. Reference values: user & synthetics:
  • user: Data generated by the RUM feature;
  • synthetics: Data generated by headless synthetic tests.
  • session_first_view_id string The view_id of the first page in the current session
    session_first_view_url string The URL of the first page in the current session
    session_first_view_host string The domain name of the first page in the current session
    session_first_view_path string The address of the first page in the current session
    session_first_view_path_group string The address grouping of the first page in the current session
    session_first_view_url_query string The query information of the first page in the current session
    session_first_view_name string The address grouping of the first page in the current session, same as the session_first_view_path_group field
    session_last_view_id string The view_id of the last visited page in the current session
    session_last_view_url string The URL of the last page in the current session
    session_last_view_host string The domain name of the last page in the current session
    session_last_view_path string The address of the last page in the current session
    session_last_view_path_group string The address grouping of the last page in the current session
    session_last_view_url_query object The query information of the last page in the current session
    session_last_view_name string The address grouping of the last page in the current session, same as the session_last_view_path_group field

    Statistical Metrics

    Field Type Description
    time_spent number(ns) Current session duration
    session_time_spent_count number Counted by adding 1 for every 4-hour interval exceeded
    session_view_count number Number of view_id associated with the current session
    session_error_count number Number of errors generated in the current session
    session_resource_count number Number of resources loaded in the current session
    session_action_count number Number of user operations in the current session
    session_long_task_count number Number of long tasks generated in the current session

    View

    Attributes

    Field Type Description
    view_id string Unique ID generated each time a page is visited
    view_loading_type string Page loading type, reference values: initial_load route_change (route_change is for SPA page loading mode)
    view_referrer string Page referrer
    view_url string Page URL
    view_host string Domain part of the page URL
    view_path string Path part of the page URL
    view_path_group string Path grouping of the page URL
    view_url_query string Query part of the page URL

    Metrics

    Metric Type (Unit) Introduction
    loading_time number(ns) The page is ready, and there are no network requests or DOM changes. For details, refer to Page Loading Time
    largest_contentful_paint number(ns) LCP reports the rendering time of the largest image or text block visible in the viewport (relative to the time the user first navigated to the page). To provide a good user experience, LCP should occur within 2.5 seconds of the page first starting to load.
    largest_contentful_paint_element_selector string The selector of the element corresponding to the LCP metric
    cumulative_layout_shift number(ns) Cumulative Layout Shift, measuring visual stability. To provide a good user experience, a page's CLS should be 0.1 or less.
    cumulative_layout_shift_target_selector number(ns) The selector of the element corresponding to the CLS metric
    first_input_delay number(ns) Measures the input delay of the first interaction on the page, currently replaced by INP.
    interaction_to_next_paint number(ns) Improves FID by considering all page interactions (from input delay to the time required to run event handlers, to the browser painting the next frame).
    interaction_to_next_paint_target_selector number(ns) The selector of the element corresponding to the INP metric
    first_contentful_paint number(ns) The First Contentful Paint (FCP) metric measures the time from when the page starts loading to when any part of the page's content is rendered on the screen. For this metric, "content" refers to text, images (including background images), <svg> elements, or non-white <canvas> elements. Refer to w3c
    first_byte number(ns) Time from requesting the page to the first byte of the page response
    dom_interactive number(ns) The time when the parser finishes parsing the document. For details, refer to MDN
    dom_content_loaded number(ns) The DOMContentLoaded event is fired when the pure HTML is fully loaded and parsed, without waiting for stylesheets, images, or subframes to finish loading. For details, refer to MDN
    dom_complete number(ns) The page and all sub-resources are ready. For the user, the loading spinner has stopped spinning. For details, refer to MDN
    load_event number(ns) Fired when the entire page and all dependent resources such as stylesheets and images have finished loading. It differs from DOMContentLoaded, which fires as soon as the page DOM is loaded without waiting for dependent resources to load. For details, refer to MDN
    resource_load_time number(ns) Resource loading time
    Calculation: loadEventStart - domContentLoadedEventEnd
    time_to_interactive number(ns) Time to Interactive
    Calculation: domInteractive - fetchStart
    dom number(ns) DOM parsing time
    Calculation: domComplete - domInteractive
    dom_ready number(ns) DOM Ready time
    Calculation: domContentLoadedEventEnd - navigationStart
    time_spent number(ns) Page dwell time
    is_active boolean Determines whether the user is still active, reference values: true & false

    Statistical Metrics

    Field Type Description
    view_error_count number Number of errors that occurred during each page load
    view_resource_count number Number of resources requested during each page load
    view_long_task_count number Number of long tasks generated during each page load
    view_action_count number Number of operations during page viewing
    view_apdex_level number Page Apdex satisfaction level.
    Base metric: first_paint_time (converted to seconds)
    Reference values: 0/1/2/3/4/5/6/7/8/9 (based on first_paint_time value, 9 represents >= 9 seconds)

    Resource

    View Attributes

    Field Type Description
    view_id string Unique ID generated each time a page is visited
    is_active boolean Determines whether the user is still active, reference values: true | false
    view_loading_type string Page loading type, reference value: initial_load
    view_referrer string Page referrer
    view_url string Page URL
    view_host string Domain part of the page URL
    view_path string Path part of the page URL
    view_path_group string Path grouping of the page URL
    view_url_query string Query part of the page URL

    Resource Attributes

    Field Type Description
    resource_url string Resource URL
    resource_url_host string Domain 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 Path grouping of the resource URL
    resource_type string Category of the resource
    resource_method string Resource request method
    resource_status string Status value returned by the resource request
    resource_status_group string Status group value returned by the resource request

    Metrics

    Field Type Description
    resource_size number Resource size, default unit: byte
    resource_dns number(ns) Resource loading DNS resolution time
    Calculation: domainLookupEnd - domainLookupStart
    resource_tcp number(ns) Resource loading TCP connection time
    Calculation: connectEnd - connectStart
    resource_ssl number(ns) Resource loading SSL connection time
    Calculation: connectEnd - secureConnectStart
    resource_ttfb number(ns) Resource loading request response time
    Calculation: responseStart - requestStart
    resource_trans number(ns) Resource loading content transmission time
    Calculation: responseEnd - responseStart
    resource_first_byte number(ns) Resource loading first byte time
    Calculation: responseStart - domainLookupStart
    duration number(ns) Resource loading time
    Calculation: duration(responseEnd-startTime)

    Error

    View Attributes

    Field Type Description
    view_id string Unique ID generated each time a page is visited
    is_active boolean Determines whether the user is still active, reference values: true | false
    view_loading_type string Page loading type, reference value: initial_load
    view_referrer string Page referrer
    view_url string Page URL
    view_host string Domain part of the page URL
    view_path string Path part of the page URL
    view_path_group string Path grouping of the page URL
    view_url_query string Query part of the page URL

    Error Attributes

    Field Type Description
    error_source string Error source, reference values: console | network | source | custom
    error_type string Error type, reference link: error type
    resource_status string Status value returned by the resource request
    resource_url string Resource URL
    resource_url_host string Domain part of the resource URL
    resource_url_path string Path part of the resource URL
    resource_url_path_group string Path grouping of the resource URL
    resource_method string Resource request method

    Metrics

    Field Type Description
    error_message string Error message
    error_stack string Error stack

    Long Task

    View Attributes

    Field Type Description
    view_id string Unique ID generated each time a page is visited
    is_active boolean Determines whether the user is still active, reference values: true | false
    view_loading_type string Page loading type, reference value: initial_load
    view_referrer string Page referrer
    view_url string Page URL
    view_host string Domain part of the page URL
    view_path string Path part of the page URL
    view_path_group string Path grouping of the page URL
    view_url_query string Query part of the page URL

    Metrics

    Field Type Description
    duration number(ns) Time spent on long tasks generated during page loading

    Action

    View Attributes

    Field Type Description
    view_id string Unique ID generated each time a page is visited
    is_active boolean Determines whether the user is still active, reference values: true | false
    view_loading_type string Page loading type, reference value: initial_load
    view_referrer string Page referrer
    view_url string Page URL
    view_host string Domain part of the page URL
    view_path string Path part of the page URL
    view_path_group string Path grouping of the page URL
    view_url_query string Query part of the page URL

    Action Attributes

    Field Type Description
    action_id string Unique ID generated during user page operations
    action_name string Action name
    action_type string Action type

    Metrics

    Field Type Description
    duration number(ns) Time spent on the page operation

    Statistical Metrics

    Field Type Description
    action_long_task_count number Number of long tasks associated with the operation
    action_resource_count number Number of resource requests associated with the operation
    action_error_count number Number of errors associated with the operation

    Feedback

    Is this page helpful? ×