-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add docs for Time to Interactive #471
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -211,4 +211,50 @@ telemetries: [ | |||||
} | ||||||
], | ||||||
] | ||||||
``` | ||||||
``` | ||||||
|
||||||
## Time to Interactive (TTI) | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: This section isn't structurally consistent with the other sections. Specifically, sections in this doc follow the following format:
|
||||||
#### What is Time to interactive (TTI)? | ||||||
|
||||||
Time to interactive (TTI) is a measure of how long a page takes till it is interactive. AWS RUM Web Client provides a plugin you can use to record this measurement. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
#### How is TTI measured by the AWS RUM web client? | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Omit this section's information. Because this file focuses on documenting how to configure the web client, if we want to document how TTI is defined, I think we should do it elsewhere. |
||||||
|
||||||
The web client TTI plugin implements the [*Boomerang TTI algorithm*](https://akamai.github.io/boomerang/oss/BOOMR.plugins.Continuity.html#toc11__anchor), with some modifications. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
suggestion: explicitly state that we have omitted page busy metrics from the boomerang algorithm for performance concerns |
||||||
|
||||||
_Steps to TTI calculation:_ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
1) Find visually ready timestamp (highest of domcontentLoadedEnd, First Contentful Paint or Largest Contentful Paint, whichever are available). | ||||||
2) Starting from the visually ready timestamp, find a 500ms quiet window. A quiet window has the following characteristics: | ||||||
* No Long Tasks | ||||||
* FPS (Frames Per Second) is above 20 (if enabled) | ||||||
3) TTI is recorded as visually ready timestamp + time from visually ready to the start of the quiet window. | ||||||
|
||||||
Note: TTI can be measured using the plugin only when running in a browser that supports [*Long Tasks*](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceLongTaskTiming). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: move browser support to its own section |
||||||
|
||||||
#### How to measure TTI using plugin? | ||||||
|
||||||
You can enable TTI measurements by updating your web client configuration and using the plugin provided. | ||||||
|
||||||
``` | ||||||
import { TTIPlugin } from "aws-rum-web"; | ||||||
|
||||||
const config = { | ||||||
... | ||||||
sessionSampleRate: 1, | ||||||
telemetries: ["performance", "errors", "http"], | ||||||
eventPluginsToLoad: [new TTIPlugin()], | ||||||
allowCookies: true, | ||||||
enableXRay: false, | ||||||
... | ||||||
}; | ||||||
|
||||||
``` | ||||||
|
||||||
By default, FPS (Frames per second) measurements are disabled when computing TTI. Enabling these measurement may result in some impact to your application's performance. To enable FPS measurements, simply pass option to the plugin your web client configuration: | ||||||
|
||||||
``` | ||||||
eventPluginsToLoad: [new TTIPlugin(true)], | ||||||
``` | ||||||
Note: You must enable enable custom events to ingest TTI events in your application monitor settings. See | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: Why are custom events required? My understanding was that TTI is not a custom event.
Could you explain what might cause extra charges? e.g. Recording TTI events will incur the cost of roughly one RUM (or custom?) event per user session There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. synced offline |
||||||
[*custom events*](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html) in the CloudWatch RUM user guide. Recording TTI events may incur Cloudwatch RUM extra charges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Mention TTI in
eventPluginsToLoad
, otherwise this section is dangling, while every other section is referenced from the Configuration Options section. For example: