This product is not supported for your selected Datadog site. ().

Overview

The RUM C++ SDK generates events that have associated attributes. Quantifiable attributes can be used for measurements related to the event, while non-quantifiable attributes can be used to slice telemetry in analytics (group by).

Every RUM event has all of the default attributes, for example, the device type (device.type) and user information such as their name (usr.name) and their country (geo.country). There are also event-specific attributes. You can further enrich your session data by adding custom attributes.

Events

Event typeRetentionDescription
Session30 daysA session represents a continuous usage period in your application. It begins with the first call to StartView() and remains active as long as the application is in use. All RUM events generated during the session share the same session.id. Note: The session resets after 15 minutes of inactivity and expires after 4 hours of continuous activity.
View30 daysA view corresponds to a logical screen or scene, tracked manually using StartView() and StopView(). All events (errors, resources, and actions) generated while a view is active are attached to it with a unique view.id.
Resource15 daysA resource represents a network request, tracked manually using StartResource() and StopResource(). Resources are associated with the active view.
Error30 daysAn error represents an exception or problem in the application, reported with AddError() or automatically captured as a crash. Errors are attached to the active view.
Action30 daysAn action represents a significant application or user event, tracked with AddAction() for instantaneous events or StartAction() and StopAction() for continuous ones. Actions are attached to the active view.

The following diagram illustrates the RUM event hierarchy:

RUM Event hierarchy

Default attributes

By default, RUM collects common attributes for all events and the event-specific attributes listed below. You can further enrich your session data by adding custom attributes.

Common core attributes

Attribute nameTypeDescription
application.idstringThe RUM application ID.
application.namestringThe RUM application name.
dateintegerStart of the event in milliseconds from epoch.
servicestringThe unified service name for this application.
envstringThe environment tag (for example, production or staging).
versionstringThe application version set with SetVersion().
typestringThe type of the event (for example, view or error).

Operating system

The following OS-related attributes are attached automatically to all events collected by Datadog:

Attribute nameTypeDescription
os.namestringThe OS name as reported by the system (for example, Windows, macOS, or Linux).
os.versionstringThe OS version string (for example, 10.0.22631, 14.2.1).
os.version_majorstringThe major version component (for example, 10, 14, 22).
os.buildstringThe OS build identifier (for example, 22631.6491, 23C71). Omitted if unavailable.

Device

The following device-related attributes are attached automatically to all events collected by Datadog:

Attribute nameTypeDescription
device.typestringThe device type (for example, desktop).
device.namestringThe device name (for example, MacBookPro, Latitude 7420).
device.modelstringThe device model identifier (for example, MacBookPro16,1).
device.brandstringThe device brand or manufacturer (for example, Apple, Dell Inc.).
device.architecturestringThe CPU architecture (for example, x86_64, arm64).
device.localestringThe system locale as a language tag (for example, en-US, fr-FR).
device.time_zonestringThe IANA time zone identifier (for example, America/New_York, Europe/Berlin).

Geolocation

The following attributes are related to the geolocation of IP addresses. Datadog resolves these attributes server-side from the client IP address on the intake connection. The SDK does not access the device's GPS or OS location.

Note: If you want to stop collecting geolocation attributes, change the setting in your application details.

Attribute nameTypeDescription
geo.countrystringName of the country.
geo.country_iso_codestringISO code of the country (for example, US for the United States or FR for France).
geo.country_subdivisionstringName of the first subdivision level of the country (for example, California in the United States).
geo.continent_codestringISO code of the continent (EU, AS, NA, AF, AN, SA, OC).
geo.continentstringName of the continent (Europe, Australia, North America, Africa, Antarctica, South America, Oceania).
geo.citystringThe name of the city (for example, San Francisco, Paris, or New York).

Global user attributes

You can enable tracking user info globally to collect and apply user attributes to all RUM events.

Attribute nameTypeDescription
usr.idstringIdentifier of the user.
usr.namestringName of the user.
usr.emailstringEmail of the user.

Account attributes

You can enable tracking account info globally to associate an account (such as an organization, workspace, or tenant) with the current session.

Attribute nameTypeDescription
acc.idstringIdentifier of the account.
acc.namestringName of the account.

Event-specific attributes

Session

AttributeTypeDescription
session.idstringUnique ID of the session.
session.typestringType of the session (user).
session.is_activeBooleanIndicates if the session is active. The session ends after 15 minutes of inactivity or 4 hours of continuous activity.
session.ipstringIP address of the session extracted from the TCP connection of the intake. If you want to stop collecting this attribute, change the setting in your application details.
session.time_spentnumber (ns)Time spent on the session.
session.view.countnumberCount of all views collected for this session.
session.action.countnumberCount of all actions collected for this session.
session.error.countnumberCount of all errors collected for this session.
session.resource.countnumberCount of all resources collected for this session.
session.initial_view.namestringName of the initial view of the session.
session.initial_view.urlstringURL of the initial view of the session.
session.last_view.namestringName of the last view of the session.
session.last_view.urlstringURL of the last view of the session.

View

Attribute nameTypeDescription
view.idstringA unique identifier for the view.
view.namestringThe name provided to StartView().
view.urlstringSame as view.name for native applications.
view.time_spentnumber (ns)Time spent on the view.
view.is_activeBooleanIndicates whether the view is active.
view.error.countnumberCount of errors generated during this view.
view.action.countnumberCount of actions generated during this view.
view.resource.countnumberCount of resources tracked during this view.

Resource

Attribute nameTypeDescription
resource.idstringA unique identifier for the resource.
resource.typestringThe type of resource being collected (for example, native, image, fetch, xhr, css, or js).
resource.methodstringThe HTTP method (for example, GET, POST, PUT, or DELETE).
resource.urlstringThe resource URL.
resource.status_codenumberThe HTTP response status code.
resource.durationnumber (ns)Time spent loading the resource.
resource.sizenumber (bytes)Response body size in bytes.

Error

Frontend errors are collected with Real User Monitoring (RUM). The error message and stack trace are included when available.

Attribute nameTypeDescription
error.sourcestringWhere the error originated (for example, source, network, or custom).
error.typestringThe error type or kind string provided to AddError().
error.messagestringA concise, human-readable, one-line message explaining the event.
error.stackstringThe stack trace or complementary information about the error.
error.categorystringHigh-level grouping for the type of error. Possible values: Exception, Network.
error.is_crashBooleantrue if the error caused the application to crash.

Network errors

Network errors include information about failing HTTP requests. The following facets are also collected:

AttributeTypeDescription
error.resource.status_codenumberThe response status code.
error.resource.methodstringThe HTTP method (for example, POST or GET).
error.resource.urlstringThe resource URL.

Action

Attribute nameTypeDescription
action.idstringA unique identifier for the action.
action.typestringThe type of action (for example, tap, click, scroll, swipe, or custom).
action.target.namestringThe name provided to AddAction() or StartAction().
action.loading_timenumber (ns)Duration of the action.
action.error.countnumberCount of errors that occurred while this action was active.
action.resource.countnumberCount of resources tracked while this action was active.

Data storage

The SDK stores events on disk before uploading them to Datadog. Events are preserved across application restarts, so data collected before an unexpected shutdown is sent on the next launch. The SDK manages disk usage automatically, pruning the oldest events when limits are reached. You can configure the storage location using SetApplicationStoragePath() in CoreConfig. See Event Storage Location for details.

Further reading

Additional helpful documentation, links, and articles: