---
title: Monitor Your RUM Usage
description: >-
  Learn how to monitor your RUM usage and receive alerts on unexpected spikes
  and impending thresholds.
breadcrumbs: >-
  Docs > RUM & Session Replay > Real User Monitoring & Session Replay Guides >
  Monitor Your RUM Usage
---

# Monitor Your RUM Usage

## Overview{% #overview %}

The goal of this guide is to explain how to monitor your RUM usage with:

- The RUM estimated usage metric
- The RUM events stored under your account

This guide covers how to track the amount of RUM sessions priced under a specific SKU or application, alert on expected traffic spikes, and alert when you are getting close to a budget threshold on your sessions.

## RUM usage metrics{% #rum-usage-metrics %}

This metric is free and available for 15 months.

{% image
   source="https://datadog-docs.imgix.net/images/real_user_monitoring/guide/monitor-your-rum-usage/estimated-usage-metric-details.5a089fd87ea213f2a774b4dfeec34162.png?auto=format"
   alt="Estimated usage metrics details side panel" /%}

By default, you can use the RUM `datadog.estimated_usage.rum.sessions` [metric](https://docs.datadoghq.com/account_management/billing/usage_metrics/) to track the number of user sessions with the following information:

- Application ID: Identifies the application available on the **Application Overview** page
- Service: Scope inside a RUM application belonging to a given team.
- Source: Which programming language or framework it is built with.
- SKU: Which paid plan the session is priced under.

### Track count of sessions for an application{% #track-count-of-sessions-for-an-application %}

To track the count of sessions generated by a RUM application, navigate to the [Dashboard List](https://app.datadoghq.com/dashboard/lists) and select a dashboard to track your RUM usage trend.

1. Click **+ Add Widgets** to open the widgets and apps side panel.
1. Select **Timeseries** under **Graphs**.
1. In the **Graph your data** section, select **Metrics** and `datadog.estimated_usage.rum.sessions` from the dropdown menus.
1. In the `from` clause, select the application ID you are interested in tracking. The RUM application ID is available on its **Application Overview** page.
1. Set your display preferences and enter a name for your graph.
1. Click **Save**.

### Track count of sessions priced under a SKU{% #track-count-of-sessions-priced-under-a-sku %}

To track the count of sessions priced under a given RUM SKU, navigate to the [Dashboard List](https://app.datadoghq.com/dashboard/lists) and select a dashboard to track your RUM usage trend.

1. Click **+ Add Widgets** to open the widgets and apps side panel.
1. Select **Timeseries** under **Graphs**.
1. In the **Graph your data** section, select **Metrics** and `datadog.estimated_usage.rum.sessions` from the dropdown menus.
1. In the `sum` clause, select the `sku` tag from the dropdown menu.
1. Set your display preferences and enter a name for your graph.
1. Click **Save**.

## Alert on unexpected spikes{% #alert-on-unexpected-spikes %}

You can use the RUM metric in [anomaly detection monitors](https://docs.datadoghq.com/monitors/types/anomaly/).

{% image
   source="https://datadog-docs.imgix.net/images/real_user_monitoring/guide/monitor-your-rum-usage/anomaly-monitor-notification.f84f943a1a7cf234836f02de8ba4263d.png?auto=format"
   alt="Example notification message in the Anomaly monitor" /%}

To create an anomaly detection monitor to be alerted of unexpected session count spikes:

1. Go to your RUM application's **Application Overview** page and copy the application ID.

1. [Create an Anomaly monitor](https://app.datadoghq.com/monitors/create/anomaly).

1. Select the `datadog.estimated_usage.rum.sessions` metric from the dropdown menu.

1. In the `from` clause, enter the `application.id` to be notified if your RUM application has a traffic spike or stops sending events.

1. Set the alert condition to match your use case, for example: an evaluation window or the number of times outside an expected range.

1. Set the notification message with actionable instructions.

This example notification message contains context links:

   ```
   An unexpected amount of sessions has been captured for application.id {{application.id}}.
   
   1. [Check the session count in the RUM Explorer for this application](https://app.datadoghq.com/rum/explorer?query=%40type%3Asession%20%40application.id%{{application.id}}&viz=timeseries&from_ts=1649824870521&to_ts=1649828470521&live=true).
   2. [Investigate whether this session count is unexpected in a specific geography or device using the query engine](https://docs.datadoghq.com/real_user_monitoring/explorer/group/).
   ```

1. Set permissions and notification settings for this monitor.

1. Click **Create**.

## Monitor RUM sessions with a fixed threshold{% #monitor-rum-sessions-with-a-fixed-threshold %}

{% image
   source="https://datadog-docs.imgix.net/images/real_user_monitoring/guide/monitor-your-rum-usage/anomaly-monitor-notifications-warning-rate.1df44654b8abe8be666dbd3f13aa2a15.png?auto=format"
   alt="Example notification message with warning rates in the Anomaly monitor" /%}

To create an anomaly detection monitor to be alerted when the number of sessions grows unexpectedly and is approaching a threshold:

1. Go to the [Datadog RUM Explorer](https://app.datadoghq.com/rum/explorer?query=%40type%3Asession) view.

1. Build a search query that represents the volume to monitor. To monitor all user sessions, leave the query blank.

1. Click **Export to monitor**.

1. Define the rate you want to set as `warning` or `error`.

1. Set a concrete notification message.

This example notification message contains actionable instructions:

   ```
   Shopist.io is sending too many user sessions. Go to the application's codebase and decrease the sample rate. Here is the (documentation)[https://docs.datadoghq.com/real_user_monitoring/guide/sampling-browser-plans] for how to do so.
   
   {{#is_warning}}@slack-Shopist-alerts {{/is_warning}}
   
   {{#is_alert}}@pagerduty-shopist{{/is_alert}}
   ```

1. Set permissions and notification settings for this monitor.

1. Click **Create**.

You are notified about the amount of sessions captured in any scope (such as the `application.id`, `geography`, `device`, and more) for your application.

## Further Reading{% #further-reading %}

- [Learn about Real User Monitoring](https://docs.datadoghq.com/real_user_monitoring/)
- [Learn how to query RUM events](https://docs.datadoghq.com/real_user_monitoring/explorer/)
- [Learn about monitors](https://docs.datadoghq.com/monitors/)
