subtext_url, opens that person’s real session, and walks the decisive moments with screenshots, the component tree, network, and console. Datadog detects; Subtext diagnoses.
This guide assumes the Subtext capture snippet is installed and the Datadog Browser RUM SDK (
@datadog/browser-rum) is initialized.Attach the session URL
Store the current Subtext session URL on your Datadog RUM data so it travels with the signal. There are three places to attach it, depending on how precise the link needs to be.On the user context
Attach the URL to the RUM user context viasetUser. It then rides along on every subsequent view, action, error, and resource event as @usr.subtext_url. Call it wherever your app already identifies the user — on auth resolution, not at module top level.
On global context
If you prefer not to overload the user object, set it as global context instead. It lands on events as@context.subtext_url.
On a specific action
When the exact moment matters, attach the URL to a single custom action.url.now carries a timestamp, so the link opens the replay at that instant — ideal for high-signal moments like errors, rage clicks, and conversion failures.
From signal to session
However you first hear about a problem in Datadog, the path is the same: get to thesubtext_url, then hand it to your agent for a Detect-vs-Diagnose read. Datadog tells you a metric crossed a threshold or an error fired; the session tells you whether a real person was actually blocked, what they saw, and the precise sequence behind it.
A PagerDuty page at 2am
A PagerDuty page at 2am
A Datadog monitor trips and PagerDuty pages the on-call engineer: “Browser RUM error rate > 5% on
/checkout for 5 min.”Open the monitor from the page and jump to the correlated RUM events. Open a representative error event, go to Attributes, and copy usr.subtext_url.A Slack alert on a frontend error
A Slack alert on a frontend error
Datadog posts to your alerts channel: “RUM error:
Uncaught TypeError — 60 sessions in the last hour.”Click into the RUM Explorer from the alert, filter to the error, open a few events, and copy usr.subtext_url from several of them.An incident review from a dashboard
An incident review from a dashboard
During or after an incident, a Datadog dashboard shows a clear anomaly window: a spike in failed requests correlated with a drop in conversions.In the RUM Explorer, scope to the incident window, filter
@usr.subtext_url:*, and open a session that sits inside the spike. Copy usr.subtext_url.For agents
An autonomous agent can run the whole loop against Datadog directly: discover the friction, extract thesubtext_url, and hand each session to the Subtext MCP. Datadog ships a first-party MCP server (GA March 2026). The hosted endpoint is site-parametrized (US1 form https://mcp.datadoghq.com/api/unstable/mcp-server/mcp — check your site’s setup docs for the current stable URL), with local stdio via the datadog_mcp_cli binary. Auth is OAuth 2.0, with DD_API_KEY + DD_APPLICATION_KEY headers (or a bearer token in the Authorization header) as a fallback. Docs: docs.datadoghq.com/mcp_server/. Repo: github.com/datadog-labs/mcp-server.
1
Discover who is affected
search_datadog_rum_events is the core discovery tool — filter on the frustration facet @action.frustration.type (values rage_click, dead_click, error_click) to surface hotspots, or @session.frustration.count:>1 for session-level friction. For grouped errors, use search_datadog_error_tracking_issues and get_datadog_error_tracking_issue; ddsql_run_query runs SQL over the dd.rum table function (pick the event subtype via its event_type parameter), and get_rum_summary / get_rum_insight return summarized hotspots.Without the MCP, the same over REST:2
Extract the session URL
Filter the same RUM search on If you set the URL as global context instead of on the user, it lands as
@usr.subtext_url:* to pull the replay links — search_datadog_rum_events does both jobs. Over REST:@context.subtext_url.3
Hand off to Subtext
For each URL, call
review-open(session_url=<subtext_url>) on the Subtext MCP. Action-level URLs are moment-precise, so the review opens exactly when the signal fired. For an incident, scope the RUM search to the incident window first, then review a session from inside the spike.subtext_url only round-trips if it was attached at capture time (see Attach the session URL); the value is frozen at set-time and doesn’t auto-update. Action-level links are moment-precise; user- and global-context links open at the moment the user was identified. Check a live response for the exact nesting of usr.subtext_url under data[N].attributes.attributes. Match your Datadog site (US1/US3/US5/EU/AP1/AP2/UK1) for both the MCP endpoint and the API host.Related
- Session Review overview — what your agent does once a session is open.
- Install the capture snippet — required before any session URL exists to attach.

