- Newest
- Most votes
- Most comments
This issue with CloudWatch RUM not consistently sending data from your Angular application could be caused by several factors.
First, ensure that the CloudWatch RUM code snippet is correctly inserted in your application. The snippet should be placed inside the <head> element of your application, before the <body> element or any other <script> tags. For Angular applications, placing it in the head section of your index.html file is typically the best approach.
Since you mentioned that data is sent initially but then stops, there could be a few possible causes:
-
Traffic generation: Make sure there's consistent traffic to your application. If there's no user activity, there might not be any data to send.
-
Domain configuration: If you're using an actual domain name (not localhost), verify that the domain configured in your app monitor matches exactly with the domain where your application is running. Mismatches can cause 403 Forbidden errors.
-
Permissions and configuration: Check that your IdentityPoolId and other configuration parameters are correct and have the necessary permissions.
-
Network issues: The CloudWatch RUM web client periodically sends data to the CloudWatch RUM service. If there are network connectivity issues, this could prevent data from being sent.
-
Application updates: If your Angular application undergoes updates or route changes, ensure the RUM code snippet remains active across these changes.
To troubleshoot further:
- Check your browser's developer console for any error messages related to the CloudWatch RUM client
- Verify that cookies are allowed if your configuration has allowCookies set to true
- Consider monitoring the network requests in your browser's developer tools to see if the requests to the dataplane endpoint are being attempted but failing
If you've verified all these aspects and are still experiencing issues, you might need to regenerate your app monitor code snippet from the CloudWatch RUM console and reinstall it in your application.
Sources
Troubleshooting CloudWatch RUM - Amazon CloudWatch
CloudWatch RUM - Amazon CloudWatch
RUM App monitor with actual domain name throws 403 error | AWS re:Post
Inserting the CloudWatch app monitor code snippet into your application - Amazon CloudWatch
Relevant content
asked a year ago
asked 4 years ago
asked 2 years ago

I verify but there are no network calls to data plan api also there are no errors in console there should not be any configuration issues, as it sends data on first time load