RUM alerts and dashboards

Embed
Preview of the card
<a href="https://forumulate.com/p/watchtower/docs/rum"><img src="https://forumulate.com/api/public/orgs/watchtower/spaces/docs/pages/9e78bf3d-b50a-4e3f-9cc3-1f617c4ab8a0/social-card.svg?v=3e7ae33eec8b" alt="RUM alerts and dashboards" width="600" height="315"></a>

The rum_metric rule kind

{"name": "Checkout LCP", "kind": "rum_metric",
 "query": {"rum_metric": {"metric": "lcp_p75", "route": "/checkout"}},
 "condition": {"threshold": {"op": "gt", "value": 4000}}, "window_s": 900, "for_s": 300}

Metrics: lcp_p75, inp_p75 (ms), cls_p75 (unitless), js_error_rate (errors per 100 views), session_error_rate and rage_click_rate (percent of sessions), resource_error_rate (percent of failed requests, hourly rollup, no filters) and custom.

Optional filters: route, device_class, release; the rule's env applies too. A window without RUM data is no data, never zero.

Custom metrics from user events

Events sent with client.event(name, attrs) are aggregated by name:

{"metric": "custom", "custom": {"event_name": "checkout_done", "field": "amount", "agg": "p95"}}

agg is count, p50, p95 or sum; field is a numeric attribute (or value) and is required unless agg is count.

Alert rows

A rule with a route labels its alert with route and link (/rum/pages?route=...), the affected route's RUM page.

Preset dashboards

Four read-only boards: Web vitals, Frontend errors, Network and resources, Sessions and frustration. Panels are rum panels whose query text is JSON {view, ...} (vitals, pages, resources, sessions, facets) and map to the /v1/projects/{p}/rum/* routes; the route, device and release variables filter them. Clone a preset to edit it.

Updated