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

This metric is free and available for 15 months.

Estimated usage metrics details side panel

By default, you can use the RUM datadog.estimated_usage.rum.sessions metric 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

To track the count of sessions generated by a RUM application, navigate to the Dashboard List and select a dashboard to track your RUM usage trend.

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

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 and select a dashboard to track your RUM usage trend.

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

Alert on unexpected spikes

You can use the RUM metric in anomaly detection monitors.

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.

  2. Create an Anomaly monitor.

  3. Select the datadog.estimated_usage.rum.sessions metric from the dropdown menu.

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

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

  6. 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/).
    
  7. Set permissions and notification settings for this monitor.

  8. Click Create.

Monitor RUM sessions with a fixed threshold

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 view.

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

  3. Click Export to monitor.

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

  5. 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}}
    
  6. Set permissions and notification settings for this monitor.

  7. 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

PREVIEWING: may/unit-testing