aws-observability/aws-rum-web — reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript browser library that helps website owners monitor real visitors with Amazon CloudWatch RUM.
I want someone to be able to add it with npm or a script tag, give it their app ID, AWS region, and optional Cognito identity pool, then have it quietly collect useful data like page load timing, web vitals, JavaScript errors, HTTP requests, session replay events, and custom events. It should send those events to CloudWatch RUM and have a debug mode so people can see what is being sent in the browser console.
Please include a normal full version and a smaller slim version for people who care about page weight. Add clear setup docs, CDN usage docs, examples, and troubleshooting notes. Also add tests and simple commands for building, linting, running unit tests, integration tests, and trying it locally.
Keep the public API simple and friendly. Look up current AWS CloudWatch RUM docs online if you need to.
Want more depth? Deep Reverse