Generate Metrics From RUM Events

Generating metrics from RUM events is in beta. Access to this feature is provisioned to customers using Real User Monitoring. Contact Datadog Support to provide feedback.

Overview

Real User Monitoring (RUM) allows you to capture events that occur in your browser and mobile applications using the RUM SDKs and collect data from events at a sample rate. Datadog retains this event data in the RUM Explorer, where you can create search queries and visualizations.

RUM-based metrics are a cost-efficient option to summarize the data from your set of RUM events. With RUM-based metrics, you can visualize trends and anomalies across your RUM data at a granular level for up to 15 months.

You can also generate a count metric of RUM events that match a query or a distribution metric of a numeric value contained in RUM events, such as the request duration.

Create and manage RUM-based metrics

Add a RUM-based metric

To create a metric from RUM event data, navigate to UX Monitoring > Generate Metrics and click + New Metric.

Click + New Metric to create a RUM-based metric

To create a metric from a search query in the RUM Explorer, click the Export button and select Generate new metric from the dropdown menu.

Generate a RUM-based metric
  1. Select an event type you want to create a metric for, such as Actions. Your options include Actions, Errors, Resources, and Long Tasks. For more information, see Search RUM Events.

  2. Create a search query that filters your RUM events using the RUM Explorer’s search syntax.

  3. Choose a field to track from the dropdown menu next to Count.

    • Select * to generate a count of all RUM events that match your search query.
    • Optionally, enter an event attribute such as @action.target to aggregate a numeric value and create corresponding, aggregated metrics such as count, min, max, sum, and avg.

    If the RUM attribute facet is a measure, the metric value is the RUM attribute value.

  4. Select a path to group by from the dropdown menu next to group by. The metric tag name is the original attribute or tag name without the @. By default, metrics generated from RUM events do not contain tags unless they are explicitly added. You can use an attribute or tag dimension that exists in your RUM events such as @error.source or env to create metric tags.

    RUM-based metrics are considered to be custom metrics. Datadog recommends avoiding grouping by unbounded or extremely high cardinality attributes such as timestamps, user IDs, request IDs, and session IDs. For more information, see Log Management Data Security.
  5. Add percentile aggregations for distribution metrics. You can generate P50, P75, P90, P95, and P99 percentiles.

    Percentile metrics are also considered custom metrics.
  6. Give your metric a name.

  7. Click Create Metric.

Your RUM-based metric appears in the list below Custom RUM Metrics, and there may be a short delay for your metric to become available in dashboards and monitors.

Data points are not created for metrics with historical data. Data points for your RUM-based metric generate on a ten second interval, and metrics data is retained for 15 months.

Update a RUM-based metric

To update a metric, hover over a metric and click the Edit icon to the right hand corner.

  • Filter query: Change the set of matching RUM events that are aggregated into metrics.
  • Aggregation groups: Update tags or manage the cardinality of generated metrics.
  • Percentile selection: Click the Calculate percentiles toggle to remove or generate percentile metrics.

Because you cannot rename an existing metric, Datadog recommends creating another metric.

Delete a RUM-based metric

In order to stop the computing of data points from your metric (and billing), hover over a metric and click the Delete icon to the right hand corner.

Usage

You can use RUM-based metrics to do the following:

  • Visualize trends over a set period of time in a dashboard.
  • Trigger an alert when a metric behaves differently than it has in the past in an anomaly monitor.
  • Trigger an alert when a metric is predicted to cross a threshold in the future in a forecast monitor.
  • Create metric-based SLOs to track user-centric performance objectives for your teams and organizations.

Further Reading