The figures
A session or a view belongs to the window in which it began. A session that began a minute ago and has not ended counts,
with what it has shown so far, so the newest minutes of a window read a little better than they will once their sessions are
over. A longer window lessens the effect.
When a figure has no value
A count is a figure even when it is zero, which is how a rule can catch traffic that stopped. Every other figure has no value when the window holds fewer of the rows it needs than the table says: no threshold matches, nothing fires, and an incident that is open resolves. That keeps a quiet night from firing a rule on a p75 of a handful of views. Rows needed in the rule changes the number for that rule; a count has none.Narrow a rule
The editor offers the environments, pages, and versions the application had over the last day. A page is the path of the URL
with its changing parts grouped, as the pages say it. A name is compared as it is, so a
* in it is a character.
New and regressed issues are counted by the environment the issue turned up in. An issue belongs to the whole
application and keeps the first time it was seen in each environment: an issue first seen in staging last week is new in
production the first time production sees it. Without an environment, an issue is new when the application first saw it.
Create a rule
Open Alerts → Alert rules and choose New rule. A Threshold rule offers RUM alert next to Metric alert, Log alert, Trace alert, and APM alert. Choose the application, narrow it if needed, choose the figure, and the window the figure is read over: 5 minutes, 15 minutes, or an hour. The editor starts each figure on the window that suits it (a percentile or a share on an hour) and on a line people commonly page on. Creating a rule requiresalerts.manage.
Test rule draws the figure over the last stretch of time, one point for each window, with the thresholds on it: six hours for
a window of 5 or 15 minutes and twelve hours for a window of an hour. The last point is what the rule would see now. A window with
too few rows has no value and no point. The preview is worked out by the code that evaluates the rule, so what it draws is what
the rule will do.
Choosing another figure starts the thresholds and the window again, because they are in another unit. A figure that cannot be
narrowed to a page or a version says why in the form.
The alert role evaluates the rule every [alert].eval_interval_secs, 30 seconds by default, over the last window. for_periods
counts evaluations in a row that are over the line; a window of minutes already smooths the figure, so the editor starts a RUM rule
at one. See Create a rule.
Alert from a page
Alerts stands at the end of the row that says what a page is of, on the overview, errors, performance, and frustration pages. A number beside it counts the incidents going on for the application, in the colour of the worst, and is left out when there are none. The button needsalerts.read, and those who do not hold it do not see it.
It opens a drawer with the alerts of the application, in the environment the page is of, or in every environment when the page
is of all of them. The drawer has no application or environment of its own: it follows the page. It reads from the most urgent to
the least.
- Going on lists the incidents of the application that are open or acknowledged, the worst first. Each says how bad it is, which rule it is, the line the rule pages on, and when it opened. Open opens the incident over the page.
- Rules of this application lists the rules that watch it, in the environment in front and in every environment, those that
fire first, with how each stands: Firing, Pending, Healthy, or Off. New rule opens the rule editor with the
application and the environment filled in, and Edit opens a rule. Both need
alerts.manage. - Templates lists the rules worth having on the application, ready to create.
Templates
A template is a rule for a figure, with the lines it pages on and the window it is read over. Create makes the rule at once: enabled,scheduled, with the template’s lines as its severities, for_periods 1, the default escalation policy, and the
labels a rule made in the editor has, with rum.template for the template. It is named after the application, the environment,
and the template: Storefront · prod · Slow page loads. Change anything about it afterwards in Alerts → Alert rules. Creating
a rule needs alerts.manage; without it the button is off and says why.
A template that was made for the application and the environment of the page shows Created and enabled and a link to its rule in place
of the button, so that it is not made twice. It can be made again for another environment, and one made for every environment is
not the one of a single environment.
Each card says what the figure is Now, over the window of the template, read by the same code that evaluates the rule. A
Core Web Vital also says how the value grades. When a rule made from the template would fire at once, the card says so. A figure
with too few rows has no value, and the card says how many it waits for.
The lines of the Core Web Vitals are the grades web.dev gives for good and poor.
An app has seven, and crashes stand where the web vitals are. Screen errors is the error rate of the screens.
Traffic stopped pages when the window holds no session, so it is not for an application that is quiet at night.
Anomaly rules
An Anomaly detection rule offers RUM figure as a source. It compares the figure of the last window with the same window on each of the days before, with the baselines and settings of any anomaly rule. It offers every figure but New issues and Regressed issues, which have no usual level.Incidents
A rule made in the editor carries the labelsrum.application, and deployment.environment, rum.page, and rum.version for
what it narrows to, and its incidents copy them. When an incident opens, it also keeps up to three sample sessions that show the
figure at its worst, each with the session ID, the time, the value the session had, and what went with it: the views with the
worst value of a vital and the element behind it, the newest errors and their messages, the sessions with a crash or a
frustration sign, the failed requests and their paths. For new and regressed issues they are the sessions of the newest errors of
those issues. The figures of traffic have no samples.
The incident drawer, opened from Going on, from Alerts → Incidents, or from a link, shows them as Sample sessions: when
it happened, who it was (a name, an address, an ID, or the ID the SDK keeps of a visitor who never signed in), the browser and
the system, and what made it a sample. Replay opens the session five seconds before that moment when it was recorded, and Session
opens the page of a session that was not. Who they were, and whether they were recorded, is read from the sessions and needs
streams.query; without it the rows still say when and why.
Open in RUM goes to the page that tells the figure, of the same application, environment, and page, over the time of the
incident: from before the window the rule reads to a little after it was resolved, or to now while it is going on.
The rule in the API
A rule on a RUM figure hasquery.rum in place of the statement and the stream of query. Create a
rule with it.
period_secs is the window, from 60 seconds to 6 hours. The application has to exist, and page and version are refused for
the figures that cannot have them. min_samples is optional, and refused for a count. Thresholds are in the unit of the figure.
The RUM pages find the incidents of an application by the label rum.application (and by deployment.environment, when the page is
of one environment), and the rules of an application by their query.rum. A rule made through the API carries the labels it is given,
so give it these to have its incidents counted and listed on the pages. A rule made from a template adds rum.template, which is
how a card knows its template was made.
POST /api/v1/rum/alerts/preview is what Test rule reads. See the RUM API.
Permissions
alerts.readshows Alerts on the RUM pages, with the incidents, the rules, and the templates in its drawer.alerts.managecreates a rule: from a template, with New rule, or in the rule editor, and opens Edit on a rule.streams.query, the permission that reads the rest of RUM, reads the preview and what the templates say the figures are now, and who the sample sessions of an incident were.