Information collected by the CloudWatch RUM web client
This section documents the PutRumEvents schema, which defines the structure of the data that you can collect from user sessions using CloudWatch RUM.
A PutRumEvents request sends a data structure with the following fields to CloudWatch RUM.
The ID of this batch of RUM events
App monitor details, which includes the following:
App monitor ID
Monitored application version
User details, which includes the following. This is collected only if the app monitor has cookies enabled.
A user ID generated by the web client
Session ID
The array of RUM events in this batch.
RUM event schema
The structure of each RUM event includes the following fields.
The ID of the event
A timestamp
The event type
The user agent
RUM event metadata
The metadata includes page metadata, user agent metadata, geolocation metadata, and domain metadata.
Page metadata
The page metadata includes the following:
Page ID
Page title
Parent page ID. – This is collected only if the app monitor has cookies enabled.
Interaction depth – This is collected only if the app monitor has cookies enabled.
Page tags – You can add tags to page events to group pages together. For more information, see Use page groups.
User agent metadata
The user agent metadata includes the following:
Browser language
Browser name
Browser version
Operating system name
Operating system version
Device type
Platform type
Geolocation metadata
The geolocation metadata includes the following:
Country code
Subdivision code
Domain metadata
The domain metadata includes the URL domain.
RUM event details
The details of an event follow one of the following type of schemas, depending on the event type.
Session start event
This event contains no fields. This is collected only if the app monitor has cookies enabled.
Page view schema
A Page view event contains the following properties. You can deactivate
page view collection by configuring the web client. For more information, see
the
CloudWatch RUM web client documentation
Name | Type | Description |
---|---|---|
Page ID |
String |
An ID that uniquely represents this page within the application. By default, this is the URL path. |
Parent page ID |
String |
The ID of the page that the user was on when they navigated to the current page. This is collected only if the app monitor has cookies enabled. |
Interaction depth |
String |
This is collected only if the app monitor has cookies enabled. |
JavaScript error schema
JavaScript error events generated by the agent contain the following properties. The web client collects these events only if you selected to collect the errors telemetry.
Name | Type | Description |
---|---|---|
Error type |
String |
The error's name, if one exists. For more information, see
Error.prototype.name Some browsers might not support error types. |
Error message |
String |
The error's message. For more information, see
Error.prototype.message Error messages might not be consistent across different browsers. |
Stack trace |
String |
The error's stack trace, if one exists, truncated to 150 characters.
For more information, see
Error.prototype.stack Some browsers might not support stack traces. |
DOM event schema
Document object model (DOM) events generated by the agent contain the following properties.
These events are not collected by default. They are collected only if you activate the interactions telemetry.
For more information, see
the
CloudWatch RUM web client documentation
Name | Type | Description |
---|---|---|
Event |
String |
The type of DOM event, such as click, scroll, or hover.
For more information, see
Event reference |
Element |
String |
The DOM element type |
Element ID |
String |
If the element that generated the event has an ID, this property stores that ID.
For more information, see
Element.id |
CSSLocator |
String |
The CSS locator used to identify the DOM element. |
InteractionId |
String |
A unique ID for the interaction between the user and the UI. |
Navigation event schema
Navigation events are collected only if the app monitor has performance telemetry activated.
Navigation events use Navigation
timing Level 1
Note
Timestamp metrics are based on
DOMHighResTimestampstartTime
. But for Level 1, the
navigationStart
metric is subtracted from timestamp metrics to obtain relative values.
All timestamp values are in milliseconds.
Navigation events contain the following properties.
Name | Type | Description | Notes |
---|---|---|---|
initiatorType |
String |
Represents the type of resource that initiated the performance event. |
Value: "navigation" Level 1: "navigation" Level 2: entryData.initiatorType |
navigationType |
String |
Represents the type of navigation. This attribute is not required. |
Value: The value must be one of the following:
|
startTime |
Number |
Indicates when the event is triggered. |
Value: 0 Level 1: entryData.navigationStart - entryData.navigationStart Level 2: entryData.startTime |
unloadEventStart |
Number |
Indicates the time when the previous document in the window began to unload after the
|
Value: If there is no previous document or if the previous document or one of the needed redirects is not of the same origin, the value returned is 0. Level 1:
Level 2: entryData.unloadEventStart |
promptForUnload |
Number |
The time taken to unload the document. In other words, the time between |
Value: If there is no previous document or if the previous document or one of the needed redirects is not of the same origin, the value returned is 0. Level 1: entryData.unloadEventEnd - entryData.unloadEventStart Level 2: entryData.unloadEventEnd - entryData.unloadEventStart |
redirectCount |
Number |
A number representing the number of redirects since the last non-redirect navigation under the current browsing context. This attribute is not required. |
Value: If there is no redirect or if there is any redirect that is not of the same origin as the destination document, the value returned is 0. Level 1: Not available Level 2: entryData.redirectCount |
redirectStart |
Number |
The time when the first HTTP redirect starts. |
Value: If there is no redirect or if there is any redirect that is not of the same origin as the destination document, the value returned is 0. Level 1:
Level 2: entryData.redirectStart |
redirectTime |
Number |
The time taken for the HTTP redirect. This is the difference
between |
Level 1: : entryData.redirectEnd - entryData.redirectStart Level 2: : entryData.redirectEnd - entryData.redirectStart |
workerStart |
Number |
This is a property of the This attribute is not required. |
Value: If a Service Worker thread is already running, or
immediately before starting the Service Worker thread, this property returns the time immediately
before dispatching Level 1: Not available Level 2: entryData.workerStart |
workerTime |
Number |
If the resource is intercepted by a Service Worker, this returns the time required for worker thread operation. This attribute is not required. |
Level 1: Not available Level 2:
|
fetchStart |
Number |
The time when the browser is ready to fetch the document using an HTTP request. This is before checking any application cache. |
Level 1:
Level 2: entryData.fetchStart |
domainLookupStart |
Number |
The time when the domain lookup starts. |
Value: If a persistent connection is used or if the information
is stored in a cache or local resource, the value will be the same as Level 1:
Level 2: entryData.domainLookupStart |
dns |
Number |
The time required for domain lookup. |
Value: If the resources and DNS records are cached, the expected value is 0. Level 1: entryData.domainLookupEnd - entryData.domainLookupStart Level 2: entryData.domainLookupEnd - entryData.domainLookupStart |
nextHopProtocol |
String |
A string representing the network protocol used to fetch the resource. This attribute is not required. |
Level 1: Not available Level 2: entryData.nextHopProtocol |
connectStart |
Number |
The time immediately before the user agent starts establishing the connection to the server to retrieve the document. |
Value: If an RFC2616 persistent connection is used, or if the
current document is retrieved from relevant application caches or local resources, this attribute
returns the value of Level 1:
Level 2: entryData.connectStart |
connect |
Number |
Measures the time required to establish the transport connections or to perform SSL authentication. It also includes the blocked time that is taken when there are too many concurrent requests issued by the browser. |
Level 1: entryData.connectEnd - entryData.connectStart Level 2: entryData.connectEnd - entryData.connectStart |
secureConnectionStart |
Number |
If the URL scheme of the current page is "https",
this attribute returns the time immediately before the user agent starts the handshake process to secure the current connection.
It returns 0 if HTTPS is not used. For more information about URL schemes,
see URL representation |
Formula: entryData.secureConnectionStart |
tlsTime |
Number |
The time taken to complete an SSL handshake. |
Level 1:
Level 2:
|
requestStart |
Number |
The time immediately before the user agent starts requesting the resource from the server, or from relevant application caches, or from local resources. |
Level 1:
Level 2: entryData.requestStart |
timeToFirstByte |
Number |
The time taken to receive the first byte of information after a request is made. This time is relative
to the |
Level 1: entryData.responseStart - entryData.requestStart Level 2: entryData.responseStart - entryData.requestStart |
responseStart |
Number |
The time immediately after the user agent's HTTP parser receives the first byte of the response from the relevant application caches, or from local resources, or from the server. |
Level 1:
Level 2: entryData.responseStart |
responseTime |
String |
The time taken to receive a complete response in the form of bytes from the relevant application caches, or from local resources, or from the server. |
Level 1:
Level 2:
|
domInteractive |
Number |
The time when the parser finished its work on the main
document, and the HTML DOM is constructed. At this time, its
|
Level 1:
Level 2: entryData.domInteractive |
domContentLoadedEventStart |
Number |
Represents the time value equal to the time immediately before the user agent fires the DOMContentLoaded event at the current document. TheDOMContentLoaded event fires when the initial HTML document has been completely loaded and parsed. At this time, the main HTML document has finished parsing, the browser begins constructing the render tree, and subresources still have to be loaded. This does not wait for style sheets, images, and subframes to finish loading. |
Level 1:
Level 2: entryData.domContentLoadedEventStart |
domContentLoaded |
Number |
This start and end time of render tree construction is marked
by the During this time, DOM and CSSOM are ready. This property waits
on script execution, except for asynchronous and dynamically
created scripts. If the scripts depend on style sheets,
NoteThe actual values of |
Level 2: entryData.domContentLoadedEventEnd - entryData.domContentLoadedEventStart Level 2: entryData.domContentLoadedEventEnd - entryData.domContentLoadedEventStart |
domComplete |
Number |
The time immediately before the browser sets the current
document readiness of the current document to complete. At this
point, the loading of subresources, such as images, is complete.
This includes the time taken for downloading blocking content
such as CSS and synchronous JavaScript. This approximates to
|
Level 1:
Level 2: entryData.domComplete |
domProcessingTime |
Number |
The total time between the response and the load event start. |
Level 1: entryData.loadEventStart - entryData.responseEnd Level 2: entryData.loadEventStart - entryData.responseEnd |
loadEventStart |
Number |
The time immediately before the |
Level 1:
Level 2: entryData.loadEventStart |
loadEventTime |
Number |
The difference between |
Level 1: entryData.loadEventEnd - entryData.loadEventStart Level 2: entryData.loadEventEnd - entryData.loadEventStart |
duration |
String |
Duration is the total page load time. It records the timing
for downloading the main page and all of its synchronous
subresources, and also for rendering the page. Asynchronous
resources such as scripts continue to download later. This is
the difference between the |
Level 1: entryData.loadEventEnd - entryData.navigationStart Level 2: entryData.duration |
headerSize |
Number |
Returns the difference between This attribute is not required. |
Level 1: Not available Level 2: entryData.transferSize - entryData.encodedBodySize Level 2: entryData.transferSize - entryData.encodedBodySize |
compressionRatio |
Number |
The ratio of This attribute is not required. |
Level 1: Not available. Level 2:
|
navigationTimingLevel |
Number |
The navigation timing API version. |
Value: 1 or 2 |
Resource event schema
Resource events are collected only if the app monitor has performance telemetry activated.
Timestamp metrics are based on
The DOMHighResTimeStamp typedefstartTime
. But for Level 1 APIs,
the navigationStart
metric is subtracted from timestamp metrics to obtain relative values.
All timestamp values are in milliseconds.
Resource events generated by the agent contain the following properties.
Name | Type | Description | Notes |
---|---|---|---|
targetUrl |
String |
Returns the resource's URL. |
Formula: entryData.name |
initiatorType |
String |
Represents the type of resource that initiated the performance resource event. |
Value: "resource" Formula: entryData.initiatorType |
duration |
String |
Returns the difference between the This attribute is not required. |
Formula: entryData.duration |
transferSize |
Number |
Returns the size (in octets) of the fetched resource, including the response header fields and the response payload body. This attribute is not required. |
Formula: entryData.transferSize |
fileType |
String |
Extensions derived from the target URL pattern. |
Largest contentful paint event schema
Largest contentful paint events contain the following properties.
These events are collected only if the app monitor has performance telemetry activated.
Name | Description |
---|---|
Value |
For more information, see Web Vitals |
First input delay event
First input delay events contain the following properties.
These events are collected only if the app monitor has performance telemetry activated.
Name | Description |
---|---|
Value |
For more information, see Web Vitals |
Cumulative layout shift event
Cumulative layout shift events contain the following properties.
These events are collected only if the app monitor has performance telemetry activated.
Name | Description |
---|---|
Value |
For more information, see Web Vitals |
HTTP event
HTTP events can contain the following properties. It will contain either
a Response
field or an Error
field, but not both.
These events are collected only if the app monitor has HTTP telemetry activated.
Name | Description |
---|---|
Request |
The request field includes the following:
|
Response |
The response field includes the following:
|
Error |
The error field includes the following:
|
X-Ray trace event schema
These events are collected only if the app monitor has X-Ray tracing activated.
For information about X-Ray trace event schemas, see AWS X-Ray segment documents.