The `aws-rum-web` client is a JavaScript library designed for real user monitoring (RUM) of web applications, integrating seamlessly with Amazon CloudWatch. It provides telemetry on critical user experience metrics such as page load timings, JavaScript errors, and HTTP request performance. The current stable version is 2.1.0, and the package maintains a relatively active release cadence with frequent minor and patch updates. Key differentiators include its tight integration into the AWS observability ecosystem, enabling developers to gain deeper insights into their web application's frontend performance and user behavior directly within CloudWatch, and its comprehensive data collection capabilities for various web vitals and errors.
npm install aws-rum-webVerified import paths — ran on the pinned version, not inferred.
Initializes the AWS CloudWatch RUM web client with a basic configuration to start collecting data. This example demonstrates how to instantiate the `AwsRum` class, providing essential parameters like application ID, version, and region, and handles potential initialization errors.
If `VirtualPageLoadTimer` functionality is required, you must explicitly enable it in your `AwsRumConfig` object during client initialization.
Thoroughly review the RUM configuration documentation. Ensure all required parameters are correctly provided and correspond to your AWS RUM app monitor setup. Verify the IAM role has permissions to `rum:PutRumEvents`.
Update your web application's CSP to allow connections to the RUM endpoint (`connect-src`) and potentially include `script-src` and `frame-src` directives if using plugins that load external scripts or iframes.
While this issue is client-side and largely out of application control, it's important to be aware that your collected data might not represent 100% of user interactions due to these external factors. Consider informing users or testing in various browser environments.
For module usage, ensure `import { AwsRum } from 'aws-rum-web';` is at the top of your file. For CDN, verify the RUM script is loaded before `AWSRUM` is referenced.Populate the `applicationId` field in your `AwsRumConfig` with the correct value from your AWS CloudWatch RUM application monitor setup.
In your AWS RUM application monitor configuration, ensure that your application's domain (e.g., `http://localhost:3000` for development, or your production domain) is correctly added to the 'Allow additional domains' setting.
No dependency data recorded yet.