이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.

Overview

The RUM iOS SDK generates events that have associated metrics and attributes. Metrics are quantifiable values that can be used for measurements related to the event. Attributes are non-quantifiable values used to slice metrics data (group by) in analytics.

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 additional metrics and attributes that are specific to a given event type. For example, the metric view.time_spent is associated with “view” events and the attribute resource.method is associated with “resource” events.

Event TypeRetentionDescription
Session30 daysA session represents a real user journey on your mobile application. It begins when the user launches the application, and the session remains live as long as the user stays active. During the user journey, all RUM events generated as part of the session share the same session.id attribute. Note: The session resets after 15 minutes of inactivity. If the application is killed by the OS, you can reset the session while the application is in the background.
View30 daysA view represents a unique screen (or screen segment) on your mobile application. A view starts and stops when the viewDidAppear(animated:) and viewDidDisappear(animated:) callbacks on the UIViewController class are notified. Individual UIViewControllers are classified as distinct views. While a user stays on a view, RUM event attributes (Errors, Resources, Actions) get attached to the view with a unique view.id.
Resource15 daysA resource represents network requests to first-party hosts, APIs, and third-party providers in your mobile application. All requests generated during a user session are attached to the view with a unique resource.id.
Error30 daysAn error represents an exception or crash emitted by the mobile application attached to the view it is generated in.
Action30 daysAn action represents user activity in your mobile application (for example, application launch, tap, swipe, or back). Each action is attached with a unique action.id attached to the view it gets generated in.
Long Task15 daysA long task event is generated for any task in the application that blocks the main thread for more than the specified duration threshold.

The following diagram illustrates the RUM event hierarchy:

RUM Event hierarchy

Application launch

During initialization, the RUM iOS SDK creates a view called “ApplicationLaunch”. This view’s start time matches the start of the iOS process, and can be used to track your application launch time.

The ApplicationLaunch view includes any logs, actions, and resources created before your first call to startView. Use the duration of this view to determine time to first view. This view has an action, application_start, with a duration equal to the amount of time from process start until the call to applicationDidBecomeActive.

In cases where iOS decides to prewarm your application, the ApplicationLaunch view instead starts when the RUM iOS SDK is initialized, and the application_start event does not have a duration.

Default attributes

RUM collects common attributes for all events and attributes specific to each event by default listed below. You can also choose to enrich your user session data with additional events to default events specific to your application monitoring and business analytics needs.

Common core attributes

Attribute nameTypeDescription
dateintegerStart of the event in milliseconds from epoch.
typestringThe type of the event (for example, view or resource).
servicestringThe unified service name for this application used to corelate user sessions.
application.idstringThe Datadog application ID.
application.namestringThe Datadog application name.

Device

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

Attribute nameTypeDescription
device.typestringThe device type as reported by the device (System User-Agent).
device.brandstringThe device brand as reported by the device (System User-Agent).
device.modelstringThe device model as reported by the device (System User-Agent).
device.namestringThe device name as reported by the device (System User-Agent).
device.architecturestringThe CPU architecture of the device that is reporting the error.

Connectivity

The following network-related attributes are attached automatically to Resource and Error events collected by Datadog:

Attribute nameTypeDescription
connectivity.statusstringStatus of device network reachability (connected, not connected, maybe).
connectivity.interfacesstringThe list of available network interfaces (for example, bluetooth, cellular, ethernet, or wifi).
connectivity.cellular.technologystringThe type of a radio technology used for cellular connection.
connectivity.cellular.carrier_namestringThe name of the SIM carrier.

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 device (System User-Agent).
os.versionstringThe OS version as reported by the device (System User-Agent).
os.version_majorstringThe OS version major as reported by the device (System User-Agent).

Geo-location

The below attributes are related to the geo-location of IP addresses.

Note: If you want to stop collecting geo-location 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 or the Sarthe department in France).
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.

Event-specific metrics and attributes

Session metrics

MetricTypeDescription
session.time_spentnumber (ns)Time spent on a session.
session.view.countnumberCount of all views 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.action.countnumberCount of all actions collected for this session.
session.long_task.countnumberCount of all long tasks collected for this session.
session.has_replaybooleanIndicates if the session has a captured Session Replay recording attached to visually play the user experience.

Session attributes

Attribute nameTypeDescription
session.idstringUnique ID of the session.
session.typestringType of the session (user).
session.is_activebooleanIndicates if the session is currently active. The session ends if a user navigates away from the application or closes the browser window, and expires after 4 hours of activity or 15 minutes of inactivity.
session.initial_view.urlstringURL of the initial view of the session.
session.initial_view.namestringName of the initial view of the session.
session.last_view.urlstringURL of the last view of the session.
session.last_view.namestringName of the last view of the session.
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.useragentstringSystem user agent info to interpret device info.

View metrics

RUM action, error, resource, and long task events contain information about the active RUM view event at the time of collection.

MetricTypeDescription
view.time_spentnumber (ns)Time spent on this view.
view.long_task.countnumberCount of all long tasks collected for this view.
view.error.countnumberCount of all errors collected for this view.
view.resource.countnumberCount of all resources collected for this view.
view.action.countnumberCount of all actions collected for this view.
view.is_activebooleanIndicates whether the view corresponding to this event is considered active.

View attributes

Attribute nameTypeDescription
view.idstringUnique ID of the initial view corresponding to the event.
view.urlstringURL of the UIViewController class corresponding to the event.
view.namestringCustomizable name of the view corresponding to the event.

Resource metrics

MetricTypeDescription
resource.durationnumberEntire time spent loading the resource.
resource.sizenumber (bytes)Resource size.
resource.connect.durationnumber (ns)Time spent establishing a connection to the server (connectEnd - connectStart).
resource.ssl.durationnumber (ns)Time spent for the TLS handshake.
resource.dns.durationnumber (ns)Time spent resolving the DNS name of the last request (domainLookupEnd - domainLookupStart).
resource.redirect.durationnumber (ns)Time spent on subsequent HTTP requests (redirectEnd - redirectStart).
resource.first_byte.durationnumber (ns)Time spent waiting for the first byte of response to be received (responseStart - requestStart).
resource.download.durationnumber (ns)Time spent downloading the response (responseEnd - responseStart).

Resource attributes

AttributeTypeDescription
resource.idstringUnique identifier of the resource.
resource.typestringThe type of resource being collected (for example, xhr, image, font, css, or js).
resource.methodstringThe HTTP method (for example, POST, GET, PATCH, or DELETE).
resource.status_codenumberThe response status code.
resource.urlstringThe resource URL.
resource.provider.namestringThe resource provider name. Default is unknown.
resource.provider.domainstringThe resource provider domain.
resource.provider.typestringThe resource provider type (for example, first-party, cdn, ad, or analytics).

Error attributes

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

AttributeTypeDescription
error.sourcestringWhere the error originates from (for example, webview, logger, or network).
error.typestringThe error type (or error code in some cases).
error.messagestringA concise, human-readable, one-line message explaining the event.
error.stackstringThe stack trace or complementary information about the error.
error.issue_idstringThe stack trace or complementary information about the error.
error.categorystringThe high-level grouping for the type of error. Possible values are Memory Warning, Watchdog Termination, App Hang, or Exception.
error.filestringFile where the issue found by Error Tracking occurred.
error.is_crashbooleanIndicates whether the error caused the application to crash.
freeze.durationint64Duration of the main thread freeze (in nanoseconds). This is only supported for App Hangs.

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.
error.resource.provider.namestringThe resource provider name. Default is unknown.
error.resource.provider.domainstringThe resource provider domain.
error.resource.provider.typestringThe resource provider type (for example, first-party, cdn, ad, or analytics).

Action metrics

MetricTypeDescription
action.loading_timenumber (ns)The loading time of the action.
action.long_task.countnumberCount of all long tasks collected for this action.
action.resource.countnumberCount of all resources issued by this action.
action.error.countnumberCount of all errors issued by this action.

Action attributes

AttributeTypeDescription
action.idstringUUID of the user action.
action.typestringType of the user action (for example, tap or application_start).
action.namestringName of the user action.
action.target.namestringElement that the user interacted with. Only for automatically collected actions.

Data Storage

Before data is uploaded to Datadog, it is stored in cleartext in the cache directory (Library/Caches) of your application sandbox, which can’t be read by any other app installed on the device.

Further Reading