Overview
In Datadog Real User Monitoring (RUM), a journey represents a major user-facing area of your application like checkout, login, or search. Each journey includes operations, which are the critical technical steps that make the experience work.
- Business teams use journeys to track and improve user conversion.
- Engineering teams use operations to monitor and minimize technical failures that impact key user moments.
You can create operations with the RUM SDK APIs, directly in Datadog, or programmatically with the Datadog API.
For example, the checkout experience of an ecommerce platform is a journey. Within it, operations might include entering payment details, saving a payment method, and completing a purchase. After you create operations, Datadog RUM measures each operation’s performance, including execution volume, completion rate, and failure rate. Measuring operations’ health enables you to identify exactly when and why users may not convert in your journey.
The following table shows additional example journeys and their associated journey operations by industry.
| Industry | Journey | Journey operations |
|---|
| Social network | Profile | Users can load their profile Users can upload a picture Users can update their status |
| Ecommerce | Checkout | Users can enter payment details Users can save their payment method Users can pay |
| Streaming | Search | Users can find results for their search Users can load the description of a title Users can start watching the trailer |
| CRM | Quote | Users can start a new quote Users can add line items to the quote Users can send a quote to recipients |
Prerequisites
- RUM without Limits must be enabled in your organization.
- To create operations with SDK APIs, download a supported Datadog RUM SDK version with client-side APIs to define operations:
Create operations with the SDK APIs
Use the SDK APIs to define your operations.
Start an operation
Every operation must be started by calling startOperation (some SDKs may use the legacy name of this API - startFeatureOperation).
DD_RUM.init({
...,
enableExperimentalFeatures: ["feature_operation_vital"], // you need to have this flag turned on for the API to work
})
startFeatureOperation: (
name: string,
options?: {
operationKey?: string,
context?: Context,
description?: string,
}) => void
GlobalRumMonitor.get().startOperation(
name: String,
operationKey: String?,
options: OperationOptions,
attributes: Map<String, Any?>
)
RUMMonitor.shared().startOperation(
name: String,
operationKey: String?,
attributes: [AttributeKey: AttributeValue]?,
options: OperationOptions?
)
DdRum.startFeatureOperation(
name: string,
operationKey?: string,
attributes?: Record<string, any>
)
DatadogSdk.instance.rum?.startFeatureOperation(
String name, {
String? operationKey,
Map<String, Object?> attributes = const {},
}
)
To use operations on Flutter Web, enable the feature_operation_vital experimental feature in the Browser SDK.
m.global.datadogRumAgent@.startOperation(
name as string,
operationKey = invalid as dynamic, ' optional: string or invalid for unkeyed operations
context = {} as object ' optional: AssocArray of custom attributes
)
The Operation's name may only contain letters, digits, or the characters - _ . @ $, and cannot contain any whitespaces.
Stop an operation with success
Every started operation must have a stop. Use succeedOperation to stop an operation with a successful outcome (some SDKs may use the legacy name of this API - succeedFeatureOperation).
succeedFeatureOperation: (
name: string,
options?: {
operationKey?: string,
context?: Context,
description?: string,
}) => void
GlobalRumMonitor.get().succeedOperation(
name: String,
operationKey: String?,
attributes: Map<String, Any?>
)
RUMMonitor.shared().succeedOperation(
name: String,
operationKey: String?,
attributes: [AttributeKey: AttributeValue]?
)
DdRum.succeedFeatureOperation(
name: string,
operationKey?: string,
attributes?: Record<string, any>
)
DatadogSdk.instance.rum?.succeedFeatureOperation(
String name, {
String? operationKey,
Map<String, Object?> attributes = const {},
}
)
To use operations on Flutter Web, enable the feature_operation_vital experimental feature in the Browser SDK.
m.global.datadogRumAgent@.succeedOperation(
name as string,
operationKey = invalid as dynamic, ' optional: string or invalid for unkeyed operations
context = {} as object ' optional: AssocArray of custom attributes
)
The operationKey must be the same in the start and end Operation event.
Stop an operation with failure
Every started operation must have a stop. Use failOperation to stop an operation with a failure outcome (some SDKs may use the legacy name of this API - failFeatureOperation).
DD_RUM.init({
...,
enableExperimentalFeatures: ["feature_operation_vital"], // this flag needs to be enabled for the API to work
})
failFeatureOperation: (
name: string,
failureReason: FailureReason, //'error' | 'abandoned' | 'other'
options?: {
operationKey?: string,
context?: Context,
description?: string,
}) => void
GlobalRumMonitor.get().failOperation(
name: String,
operationKey: String?,
failureReason: FailureReason, // ERROR, ABANDONED, OTHER
attributes: Map<String, Any?>
)
RUMMonitor.shared().failOperation(
name: String,
operationKey: String?,
reason: RUMFeatureOperationFailureReason, // .error, .abandoned, .other
attributes: [AttributeKey: AttributeValue]
)
m.global.datadogRumAgent@.failOperation(
name as string,
failureReason as string, ' "error", "abandoned", or "other"
operationKey = invalid as dynamic, ' optional: string or invalid for unkeyed operations
context = {} as object ' optional: AssocArray of custom attributes
)
DdRum.failFeatureOperation(
name: string,
operationKey?: string,
reason: FeatureOperationFailure, // 'ERROR' | 'ABANDONED' | 'OTHER'
attributes: Record<string, any>
)
DatadogSdk.instance.rum?.failFeatureOperation(
String name,
RumFeatureOperationFailureReason failureReason, // .error, .abandoned, .other
{
String? operationKey,
Map<String, Object?> attributes = const {},
}
)
To use operations on Flutter Web, enable the feature_operation_vital experimental feature in the Browser SDK.
Parallelization
You may have cases where users are starting several journey operations in parallel. To individually track them, use the operationKey defined when calling startOperation. You must reuse the same operationKey later in other APIs, for example when calling succeedOperation.
Operations that have been started but not explicitly stopped are automatically terminated when the RUM session expires. Those are marked as failed, with @operation.failure_reason:timeout.
If an operation stop API was called that was not started in the first place, the stop event emitted by the SDK is dropped upon ingestion.
Create operations from Datadog
You can create an operation from either the operations catalog or a journey’s details report:
- Operations catalog: Navigate to RUM > Operations, then click New Operation
- Journey Monitoring: Navigate to Digital Experience > Journey Monitoring, select a journey, navigate to its Details Report, then click New Operation
Each RUM application supports up to 1000 operations created from Datadog through the UI or API. There is no organization-wide limit on operations created directly in Datadog.
Step 1: Enter operation details and select the operation category
Select the operation’s RUM application and enter a display name. You may optionally add a description to the operation.
Select the operation’s category to determine the RUM event types compatible with the start, success, and failure conditions.
| Operation category | Summary | Supported event types |
|---|
| Component loading | Measure how long a user-initiated action takes to complete | Start: Action Success: Resource or custom action Failure: Resource, error, or custom action |
| Form submission | Measure how long a form submit or mutation takes to succeed | Start: Action Success: Resource, view, or custom action Failure: Resource, error, or custom action |
| Page or screen load | Measure how long a page or screen takes to load and display data | Start: View Success: Resource, view, or custom action Failure: Resource, error, or custom action |
| Page or screen navigation | Measure how long a navigation from one page or screen to another takes to succeed | Start: Action or view Success: Resource, view, or custom action Failure: Resource, error, or custom action |
| Custom | Define a custom operation with any event type combination | Start: Action or view Success: Resource, view, or custom action Failure: Resource, error, or custom action |
Step 2: Define the start event
Each operation must have a starting RUM event. Operations can begin with either an action or view event depending on the selected operation category.
Step 3: Define the success conditions
Each operation must have a condition for ending in a success. Operations can end in success with a resource, view, or custom action event, depending on the selected operation category.
Step 4: Define the failure conditions
Each operation must have a condition for ending in a failure:
- Error failures can end as a resource, error, or custom action.
- Abandon failures can be toggled on in case the user navigates away from the starting view before the operation finishes.
Allow up to 15 minutes for metrics to appear in the operations catalog after you create an operation in Datadog through the UI or API.
Create operations with the Datadog API
Operations can also be created through the Datadog API.
Edit operations
In the operations catalog, click the pencil icon to edit an operation. You can edit the description of any operation, regardless of how it was created. Operations created through the UI or API can be fully edited (not just the description).
Monitor your availability on Datadog
After you create operations with the RUM SDK APIs, directly in Datadog, or with the Datadog API, monitor them by navigating to RUM > Performance Monitoring > Operations.
Datadog groups together all operations with the same name into a catalog.
Each operation has two out-of-the-box metrics computed over your full, ingested, unsampled traffic:
rum.measure.operation, which counts the volume of operations reported to Datadogrum.measure.operation.duration, which measures the elapsed time between the start and end of all the operations reported to Datadog
Both metrics are retained for 15 months, and include several dimensions:
operation.name, which is defined on the client sideoperation.status, which is either a success or failureoperation.failure_reason, which can be an error, or abandoned, or other
Those metrics are included in the price of RUM Measure and available to all RUM without Limits customers that define one or more operations.
Investigate root causes with AI
You can run an agentic investigation on a single operation directly from the Operations page. The agent analyzes both the success rate and the latency of the operation and surfaces focused investigations for each failure mode (errors, timeouts, abandonment) and for latency regressions. For more information, see Operation AI Investigation.
Operations are a new type of event in RUM. Operations are bound to a RUM Session, but can span across multiple RUM Views. Operations can be targeted in retention filters. This allows you to align your retention strategy on journeys that are cornerstones for your user experiences. For example, you can programmatically keep RUM Sessions that had specific operations fail or are taking longer than desired.
Similarly to metrics, those events come with specific attributes you can use in retention filters:
@operation.name@operation.status@operation.failure_reason@operation.duration@operation.start_view.name@operation.end_view.name
Further Reading
Additional helpful documentation, links, and articles: