type, a date, the session and the view it belongs to, and an object named
after its type that carries the details. The JSON Schema of an event ships with the source as
contracts/rum/events/v1.schema.json, together with valid and invalid example events.
Send events
The answer
The answer reports every event on its own, so one bad event does not discard the rest of the request.
A request whose events are all bad still answers
200, with accepted set to 0. A request that
cannot be read at all fails as a whole: 400 for a body that is not JSON, an unsupported
Content-Encoding, or a gzip stream that cannot be decoded; 401 or 403 for a token that is missing,
revoked, or without rum.write; 413 for a request over the limits above.
An event is rejected for one of these reasons:
An SDK reports rejected events through its error callback and does not send them again.
Rules
dateis the time the event began, in epoch milliseconds. Thedateof aviewis the start of the view and never changes between its revisions.- Every duration, and every time relative to the start of a view, such as
performance.lcp.timestamporresource.dns.start, is an integer number of nanoseconds. Round before sending. - A view is sent again with a higher
view.revisionand its counts so far, whenever something in it changes. MoleSignal keeps the highest revision. Counts are cumulative, never deltas. - A client sends no session event. MoleSignal derives the session from its views: its start and end, duration, counts, landing and exit page, and whether a replay was recorded.
session.start, in epoch milliseconds, is optional and expected. A node that does not know a session yet uses it to tell a session that began moments ago from one it lost track of.application.idis optional. The application is the one the client token is bound to, and a different value is rejected.geoandnetworkare written by MoleSignal and ignored when sent. So isretention:retention.rateis the share of such rows that was kept, in percent, andretention.filteris what kept the row (the id of a filter,default, orerrorsfor an error of a session that was not kept). Totals are worked out with them.- A field the schema does not know is accepted and kept. A field the schema knows with the wrong type or value rejects the event.
error.framescarries the structured stack that source maps, mapping files, and native symbol files are applied to.error.stackis the same stack as text for display and search.
Attributes of every event
Identifiers match
A-Z, a-z, 0-9, ., _, :, and -, up to 128 characters. Text attributes of
usr, account, and the device are limited to 256 characters.
View
Aview event carries a view object with these fields next to the url, name, and id above.
Action
Error
Resource
Long task
Vital
What MoleSignal adds
- Place: the country, subdivision, city, continent, and coordinates of the client IP address, looked up in the DB-IP City Lite database. The address itself is kept only when the application keeps it.
- Browser, system, and device: for browser events that carry none, parsed from the
User-Agentheader. A crawler becomesdevice.type: bot. Values an SDK sends win. - URL parts:
view.url_host,view.url_path, andview.url_path_group, and the same forresource.url. - Long task scripts:
long_task.top_script.source_url,long_task.top_script.function, andlong_task.top_script.invoker_type, from the entry oflong_task.scriptsthat ran the longest. A browser that reports no scripts leaves them empty, and what a client sends in these columns is dropped. - Sessions: the
rum_sessionsrow of each session, derived from its views.
Where the events are stored
Each type has its own ordinary Logs stream, created with the first application. The streams have a fixed schema, so a value of the wrong type never changes a column.
Columns are the flattened names of the event, such as
view.performance.lcp.timestamp and resource.status_code.
Browse them in the RUM explorer, or query the streams with SQL on Logs.
Example
A request with a view that is sent again, a failed request, and the error it caused:RUM applications
Create the application a client token is bound to.
RUM explorer
Search the events by type and field.