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 TypeDescription
SessionA 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
ViewA view event is generated each time a user visits a page of the web application. It is been captured in root.url attribute
ResourceA resource event is generated for images, XHR, Fetch, CSS, or JS libraries loaded on a webpage. It includes detailed loading timing information
Long TaskA long task event is generated for any task in the browser that blocks the main thread for more than 50ms
ErrorRUM collects every frontend error emitted by the browser
ClickRUM click events track user interactions during a user journey & monitors the click events

Core

AttributeTypeDescription
session.idstringGenerates a unique session id. Valid for max 4 hours & generates new session id if idle for 15mins
project.namestringBrowser application name
service.namestringA service denotes a set of pages built by a team that offers a specific functionality in your browser application

View Metric

MetricTypeDescription
view_countnumberCount of views loaded

View Attributes

AttributeTypeDescription
browser.tracestringDefaults to true for RUM
rum_origin/originstringstring containing the Unicode serialisation of the origin of the represented URL. Example - https://middleware.io/
root.urlstringThe path part of the URL
envstringDefaults to prod can be configured during setup

Operating System

AttributeTypeDescription
osstringThe OS name as reported by the device (User-Agent HTTP header)
navigator.userAgentstringThe user agent string for the current browser

Geo-Location

AttributeTypeDescription
cf-ipcountrystringName of the country
cf-ipcontinentstringName of the continent (AS, NA, SA)
cf-ipcitystringThe name of the city (for example, Paris or New York)
cf-iplatitudestringLatitude code
cf-iplongitudestringLongitude code
cf-regionstringRegion name
cf-region-codestringRegion code
cf-timezonestringTimezone. Example - Asia/Kolkata
cf-postal-codestringPostal code for the region

Resource Timing Metrics

MetricTypeDescription
resource_duration_mediannumber (ms)Median time spent loading the resource
resource_duration_p90number (ms)P90 time spent loading the resource
resource_first_byte_duration_mediannumber (ms)Median time spent waiting for the first byte of response to be received
resource_first_byte_duration_p90number (ms)P90 time spent waiting for the first byte of response to be received
resource_dns_duration_mediannumber (ms)Median time spent resolving the DNS request
resource_dns_duration_p90number (ms)P90 time spent resolving the DNS request
resource_download_duration_p90number (ms)P90 time spent downloading the resource
resource_connect_duration_p90number (ms)P90 time spent establishing a connection to the server

Resource Attributes

AttributeTypeDescription
resource.durationnumberEntire time spent loading the resource
resource.sizenumber (bytes)Resource size
resource.nextHopProtocolstringA string representing the network protocol used to fetch the resource. Example - http/1.1 \ h2
resource.connect.durationnumber (ms)Time spent establishing a connection to the server (connectEnd - connectStart)
resource.ssl.durationnumber (ms)Time spent for the TLS handshake. If the last request is not over HTTPS, this metric does not appear (connectEnd - secureConnectionStart)
resource.dns.durationnumber (ms)Time spent resolving the DNS name of the last request (domainLookupEnd - domainLookupStart)
resource.redirect.durationnumber (ms)Time spent on subsequent HTTP requests (redirectEnd - redirectStart)
resource.first_byte.durationnumber (ms)Time spent waiting for the first byte of response to be received (responseStart - requestStart)
resource.download.durationnumber (ms)Time spent downloading the resource (responseEnd - responseStart)
resource.typestringThe type of resource being collected (e.g.: css, javascript, media, XHR, or image)
resource.status_codenumberThe response status code (available for fetch/XHR resources only)
resource.urlstringThe resource URL
resource.url_hoststringThe host part of the URL
resource.url_pathstringThe path part of the URL
resource.url_schemestringThe protocol name of the URL (HTTP or HTTPS)
resource.provider.typestringThe resource provider type (for example, first-party, cdn, ad, or analytics)

Long Task Timing Metrics

MetricTypeDescription
longtask_countnumberCount of long task occurred
avg_longtask_durationnumberAverage long task duration
long_task_duration_p75numberP75 long task duration

Long Task Attributes

AttributeTypeDescription
longtask.durationnumberDuration of the long task
event.typestringEvent type as longtask

Error Metrics

MetricTypeDescription
error_countnumberSum of error counts
error_ratenumberPercentage of error

Error Attributes

AttributeTypeDescription
event.typestringEvent type as error
typestringThe error type could be consoleError / uncaughtException
error.namestringThe error name (or error code in some case)
error.messagestringA concise, human-readable, one-line message explaining the event
error.stackstringThe stack trace or complementary information about the error

Action Metrics

MetricTypeDescription
action_countnumberSum of actions (e.g. click/load/click/error)

Action Attributes

AttributeTypeDescription
event.typestringEvent type as click
target_elementstringThe tag name of the element on which it's called. (e.g. button / img / div)
target_xpathstringType of target as xpath
componentstringName 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

MetricTypeDescription
frustration_countnumberCount of frustration (e.g. rage_clicks + dead_clicks)

Frustration Attributes

AttributeTypeDescription
frustration.typestringThe type of frustration can be rage_click / dead_click