Browser Data Models in RUM
Middleware collects data Real User Monitoring (RUM) data in the form of traces or metrics associated with attributes. The following tables describe all the available that can be collected.
Event Type | Description |
---|---|
Session | A user session begins when a user starts browsing the web application. It contains high-level information about the user (browser, device, geo-location). It aggregates all RUM events collected during the user journey with a unique session.id attribute. Note: The session resets after 15 minutes of inactivity |
View | A view event is generated each time a user visits a page of the web application. It is been captured in root.url attribute |
Resource | A resource event is generated for images, XHR, Fetch, CSS, or JS libraries loaded on a webpage. It includes detailed loading timing information |
Long Task | A long task event is generated for any task in the browser that blocks the main thread for more than 50ms |
Error | RUM collects every frontend error emitted by the browser |
Click | RUM click events track user interactions during a user journey & monitors the click events |
Core
Attribute | Type | Description |
---|---|---|
session.id | string | Generates a unique session id. Valid for max 4 hours & generates new session id if idle for 15mins |
project.name | string | Browser application name |
service.name | string | A service denotes a set of pages built by a team that offers a specific functionality in your browser application |
View Metric
Metric | Type | Description |
---|---|---|
view_count | number | Count of views loaded |
View Attributes
Attribute | Type | Description |
---|---|---|
browser.trace | string | Defaults to true for RUM |
rum_origin /origin | string | string containing the Unicode serialisation of the origin of the represented URL. Example - https://middleware.io/ |
root.url | string | The path part of the URL |
env | string | Defaults to prod can be configured during setup |
Operating System
Attribute | Type | Description |
---|---|---|
os | string | The OS name as reported by the device (User-Agent HTTP header) |
navigator.userAgent | string | The user agent string for the current browser |
Geo-Location
Attribute | Type | Description |
---|---|---|
cf-ipcountry | string | Name of the country |
cf-ipcontinent | string | Name of the continent (AS , NA , SA ) |
cf-ipcity | string | The name of the city (for example, Paris or New York) |
cf-iplatitude | string | Latitude code |
cf-iplongitude | string | Longitude code |
cf-region | string | Region name |
cf-region-code | string | Region code |
cf-timezone | string | Timezone. Example - Asia/Kolkata |
cf-postal-code | string | Postal code for the region |
Resource Timing Metrics
Metric | Type | Description |
---|---|---|
resource_duration_median | number (ms) | Median time spent loading the resource |
resource_duration_p90 | number (ms) | P90 time spent loading the resource |
resource_first_byte_duration_median | number (ms) | Median time spent waiting for the first byte of response to be received |
resource_first_byte_duration_p90 | number (ms) | P90 time spent waiting for the first byte of response to be received |
resource_dns_duration_median | number (ms) | Median time spent resolving the DNS request |
resource_dns_duration_p90 | number (ms) | P90 time spent resolving the DNS request |
resource_download_duration_p90 | number (ms) | P90 time spent downloading the resource |
resource_connect_duration_p90 | number (ms) | P90 time spent establishing a connection to the server |
Resource Attributes
Attribute | Type | Description |
---|---|---|
resource.duration | number | Entire time spent loading the resource |
resource.size | number (bytes) | Resource size |
resource.nextHopProtocol | string | A string representing the network protocol used to fetch the resource. Example - http/1.1 \ h2 |
resource.connect.duration | number (ms) | Time spent establishing a connection to the server (connectEnd - connectStart ) |
resource.ssl.duration | number (ms) | Time spent for the TLS handshake. If the last request is not over HTTPS, this metric does not appear (connectEnd - secureConnectionStart ) |
resource.dns.duration | number (ms) | Time spent resolving the DNS name of the last request (domainLookupEnd - domainLookupStart ) |
resource.redirect.duration | number (ms) | Time spent on subsequent HTTP requests (redirectEnd - redirectStart ) |
resource.first_byte.duration | number (ms) | Time spent waiting for the first byte of response to be received (responseStart - requestStart ) |
resource.download.duration | number (ms) | Time spent downloading the resource (responseEnd - responseStart ) |
resource.type | string | The type of resource being collected (e.g.: css , javascript , media , XHR , or image ) |
resource.status_code | number | The response status code (available for fetch /XHR resources only) |
resource.url | string | The resource URL |
resource.url_host | string | The host part of the URL |
resource.url_path | string | The path part of the URL |
resource.url_scheme | string | The protocol name of the URL (HTTP or HTTPS ) |
resource.provider.type | string | The resource provider type (for example, first-party , cdn , ad , or analytics ) |
Long Task Timing Metrics
Metric | Type | Description |
---|---|---|
longtask_count | number | Count of long task occurred |
avg_longtask_duration | number | Average long task duration |
long_task_duration_p75 | number | P75 long task duration |
Long Task Attributes
Attribute | Type | Description |
---|---|---|
longtask.duration | number | Duration of the long task |
event.type | string | Event type as longtask |
Error Metrics
Metric | Type | Description |
---|---|---|
error_count | number | Sum of error counts |
error_rate | number | Percentage of error |
Error Attributes
Attribute | Type | Description |
---|---|---|
event.type | string | Event type as error |
type | string | The error type could be consoleError / uncaughtException |
error.name | string | The error name (or error code in some case) |
error.message | string | A concise, human-readable, one-line message explaining the event |
error.stack | string | The stack trace or complementary information about the error |
Action Metrics
Metric | Type | Description |
---|---|---|
action_count | number | Sum of actions (e.g. click /load /click /error ) |
Action Attributes
Attribute | Type | Description |
---|---|---|
event.type | string | Event type as click |
target_element | string | The tag name of the element on which it's called. (e.g. button / img / div ) |
target_xpath | string | Type of target as xpath |
component | string | Name of the componentuser-interaction |
Frustration Data
Frustration signals help you identify your application’s highest points of user friction by surfacing moments when users exhibit frustration.
Frustration Metric
Metric | Type | Description |
---|---|---|
frustration_count | number | Count of frustration (e.g. rage_clicks + dead_clicks ) |
Frustration Attributes
Attribute | Type | Description |
---|---|---|
frustration.type | string | The type of frustration can be rage_click / dead_click |