Skip to content

RUM Metrics Detection


Document Positioning

This document is the second step in the alert rule configuration process. After completing the configuration, please return to the main document to continue with the third step: Event Notification.


Used to monitor user access metrics data within a workspace. It supports setting threshold ranges for performance metrics of multiple application types, including Web, Android, iOS, Miniapp, React Native, and HarmonyOS. When metrics exceed the threshold, the system automatically triggers alerts.

Suitable for scenarios requiring frontend application performance monitoring. For example, monitoring JS error rate based on city dimensions for Web applications, or monitoring page load time for Miniapp and crash rate for mobile applications.

Detection Configuration

Detection Frequency

Sets the time period for executing detection.

  • Preset options: 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour
  • Default selection: 5 minutes
  • Crontab mode: Click "Switch to Crontab mode" to configure a custom period. Supports configuring scheduled task execution based on seconds, minutes, hours, days, months, weeks, etc.

Detection Interval

Sets the time range for data query in each detection (❗️The detection interval should be greater than or equal to the detection frequency, and must match the actual data reporting cycle to avoid missed detections or false positives).

Detection Frequency Detection Interval (Dropdown Options)
30s 1m/5m/15m/30m/1h/3h
1m 1m/5m/15m/30m/1h/3h
5m 5m/15m/30m/1h/3h
15m 15m/30m/1h/3h/6h
30m 30m/1h/3h/6h
1h 1h/3h/6h/12h/24h
6h 6h/12h/24h
12h 12h/24h
24h 24h
  • Custom format: Custom input for detection interval, e.g., 20m (last 20 minutes), 2h (last 2 hours), 1d (last 1 day).

Detection Metrics

Sets the metric data for detection. You can configure metrics for a single application type under the current workspace (❗️Avoid selecting high-cardinality fields as detection dimensions. Improper configuration with overly loose trigger conditions may cause frequent alerts. The maximum number of records returned by the current query is 100,000).

Configuration Elements

Configuration Item Description
Application Type Application types supported by RUM, including: Web, Android, iOS, Miniapp, HarmonyOS
Application Name Retrieves the corresponding application list based on the selected application type. Supports selecting all or specific applications
Metric Displays corresponding performance metrics based on the application type. See the metric description below for details
Filter Conditions Filters the detection metric data based on metric tags, limiting the scope of detected data. Supports adding one or more tag filters. Supports fuzzy match and fuzzy not match filter conditions
Detection Dimensions Any string type (keyword) field in the data can be selected as a detection dimension. Currently, up to three fields can be selected. By combining multiple detection dimension fields, a specific detection object can be identified. The system determines whether the statistical metric of a detection object meets the trigger condition threshold, and if so, generates an event.

* (e.g., selecting detection dimensions host and host_ip, the detection object could be {host: host1, host_ip: 127.0.0.1}.)*
Additional Information Additional fields are only used for extra queries and are not used for trigger condition judgment. They can be configured in event notifications. If multiple matching values are detected, a random record is returned

Web / Miniapp Metric Description

Metric DQL Query Example
JS Error Count R::error:(count(__docid) asJS Error Count) { app_id = '<Application ID>' }
JS Error Rate Web: eval(A/B, alias='Page JS Error Rate', A="R::view:(count(view_url)) {view_error_count > 0, app_id = '<Application ID>'}", B="R::view:(count(view_url)) { app_id = '<Application ID>'}")

Miniapp: eval(A/B, alias='JS Error Rate', A="R::view:(count(view_name)) {view_error_count > 0, app_id = '<Application ID>' }", B="R::view:(count(view_name)) { app_id = '<Application ID>' }")
Resource Error Count R::resource:(count(resource_url) asResource Error Count) {resource_status >=400, app_id = '<Application ID>'}"
Resource Error Rate eval(A/B, alias='Resource Error Rate', A="R::resource:(count(resource_url)) { resource_status >= '400',app_id = '<Application ID>' }", B="R::resource:(count(resource_url)) { app_id = '<Application ID>' }")
Average First Paint Time R::page:(avg(page_fpt)){app_id = '<Application ID>'}
Average Page Load Time R::view:(avg(loading_time)){app_id = '<Application ID>'}
Slow Page Load Count R::resource:(count(resource_load)){app_id = '<Application ID>',resource_load>8000000000,resource_type='document'}"
Average Resource Load Time R::resource:(avg(resource_load) asLoad Time) {app_id = '<Application ID>',resource_type!='document'}"
LCP (largest_contentful_paint) Supported aggregation functions: avg, percentile

R::view:(avg(largest_contentful_paint)){app_id = '<Application ID>'}
R::view:(percentile(largest_contentful_paint,75)){app_id = '<Application ID>'}
R::view:(percentile(largest_contentful_paint,90)){app_id = '<Application ID>'}
R::view:(percentile(largest_contentful_paint,99)){app_id = '<Application ID>'}
FID (first_input_delay) Supported aggregation functions: avg, percentile

R::view:(avg(first_input_delay)){app_id = '<Application ID>'}
R::view:(percentile(first_input_delay,75)){app_id = '<Application ID>'}
R::view:(percentile(first_input_delay,90)){app_id = '<Application ID>'}
R::view:(percentile(first_input_delay,99)){app_id = '<Application ID>'}
CLS (cumulative_layout_shift) Supported aggregation functions: avg, percentile

R::view:(avg(cumulative_layout_shift)){app_id = '<Application ID>'}
R::view:(percentile(cumulative_layout_shift,75)){app_id = '<Application ID>'}
R::view:(percentile(cumulative_layout_shift,90)){app_id = '<Application ID>'}
R::view:(percentile(cumulative_layout_shift,99)){app_id = '<Application ID>'}
FCP (first_contentful_paint) Supported aggregation functions: avg, percentile

R::view:(avg(first_contentful_paint)){app_id = '<Application ID>'}
R::view:(percentile(first_contentful_paint,75)){app_id = '<Application ID>'}
R::view:(percentile(first_contentful_paint,90)){app_id = '<Application ID>'}
R::view:(percentile(first_contentful_paint,99)){app_id = '<Application ID>'}

Android / iOS Metric Description

Metric DQL Query Example
Startup Time R::action:(avg(duration)) { app_id = '<Application ID>' ,action_type='app_cold_launch'}"
Total Crash Count R::error:(count(error_type)) {app_id='<Application ID>',error_source = 'logger' and is_web_view !='true'}"
Total Crash Rate eval(A.a1/B.b1, alias='Total Crash Rate',A="R::error:(count(error_type) as a1) {app_id='<Application ID>',error_source = 'logger',is_web_view !='true'} ",B="R::action:(count(action_name) as b1) { app_id = '<Application ID>',action_type in [launch_cold,launch_hot,launch_warm]} ")"
Resource Error Count R::resource:(count(resource_url) asResource Error Count) {resource_status >=400, app_id = '<Application ID>'}"
Resource Error Rate eval(A/B, alias='Resource Error Rate', A="R::resource:(count(resource_url)) { resource_status >= '400',app_id = '<Application ID>' }", B="R::resource:(count(resource_url)) { app_id = '<Application ID>' }")
Average FPS R::view:(avg(fps_avg)) { app_id = '<Application ID>' }"
Average Page Load Time R::view:(avg(loading_time)) { app_id = '<Application ID>' }"
Average Resource Load Time R::resource:(avg(duration)) { app_id = '<Application ID>' }"
Jank Count R::long_task:(count(view_id)) { app_id = '<Application ID>' }"
Page Error Rate eval(A/B, alias='Page Error Rate',A="R::view:(count(view_name)) {view_error_count > 0, app_id = '<Application ID>' }",B="R::view:(count(view_name)) { app_id = '<Application ID>' }")"

Trigger Conditions

Configure trigger conditions and severity levels. When the query result has multiple values, any value that meets the trigger condition will generate an event.

Supports configuring four levels of thresholds: Critical, Error, Warning, Info, and a OK recovery condition.

Level Configuration Description
Critical When Result >= [Value] Highest level alert, requires immediate handling
Error When Result >= [Value] High level alert, requires priority handling
Warning When Result >= [Value] Medium level alert, requires attention
Info When Result >= [Value] Low level alert, requires monitoring
OK No event generated for [N] detections After the alert rule takes effect, if the data detection result changes from abnormal (Critical, Error, Warning, Info) to normal within the configured custom detection count, a recovery alert event is triggered.
❗️ Recovery alert events are not affected by alert silence. If no recovery alert event detection count is set, the alert event will not recover and will always appear in the Events > Unrecovered Events List

For more details, refer to Event Level Description.

Advanced Options

Consecutive Trigger Judgment

After enabling, events are generated only when the trigger condition is continuously met, avoiding false positives due to transient fluctuations (❗️The maximum configuration limit is 10 times).

Mass Alert Protection

Enabled by default.

When the number of alerts generated by a single detection exceeds the preset threshold, the system automatically switches to a status summary strategy: Instead of processing each alerting object individually, it generates a small number of summary alerts based on the event status and pushes them.

This ensures notification timeliness while significantly reducing alert noise, avoiding timeout risks caused by processing too many alerts.

When this switch is enabled, the event details generated by subsequent monitor detections will not display historical records or related events.

Data Gap

Handling strategy when the query result for the detection metric is empty within the detection interval:

Option Description
Do Not Trigger Event (Default) Links to the detection interval time range. Determines whether to generate an event based on the query result of the detection metric in the last few minutes. Suitable for scenarios where data loss is acceptable
Treat Query Result as 0 Links to the detection interval time range. Treats the query result of the detection metric in the last few minutes as 0, and re-compares it with the threshold configured in the Trigger Conditions above to determine whether to trigger an abnormal event
Custom Fill and Trigger Event Supports custom filling of the detection interval value, and triggers the following event types separately: Data Gap Event, Error Event, Warning Event, Info Event, and OK Event.

❗️When selecting this strategy, it is recommended that the custom data gap time configuration ≥ the detection interval time interval; if the configured time ≤ the detection interval, data gap and anomaly may occur simultaneously, in which case the data gap handling result will be applied first

When Trigger Conditions, Data Gap, and Information Generation are configured simultaneously, the priority for triggering judgment is: Data Gap > Trigger Conditions > Information Event Generation.

That is: first determine whether there is a data gap, then determine whether the threshold is triggered, and finally determine whether to generate an information event.

Information Generation

After enabling this option, you need to configure the Information Generation Condition. When the detection result does not trigger any of the "Critical", "Error", "Warning", or "Info" thresholds, and the information generation condition is met, the system writes an "Information" event.

Suitable for scenarios where you need to record normal state changes or low-priority information.

Subsequent Configuration

After completing the above detection configuration, please continue to configure:

  1. Event Notification: Define the event title, content, notification members, data gap handling, and related incidents;

  2. Alert Configuration: Select an alert strategy, set notification targets and silence periods;

  3. Association: Associate dashboards for quick navigation to view data;

  4. Permissions: Set operation permissions to control who can edit/delete this monitor.