AppMonitor
Source:
src/AWS/RUM/AppMonitor.ts
An Amazon CloudWatch RUM app monitor that collects client-side telemetry (page load times, JavaScript errors, user behavior) from your web application.
Creating App Monitors
Section titled “Creating App Monitors”Monitor a single domain
import * as RUM from "alchemy/AWS/RUM";
const monitor = yield* RUM.AppMonitor("SiteMonitor", { domain: "example.com",});Sample all sessions and collect every telemetry type
const monitor = yield* RUM.AppMonitor("SiteMonitor", { domain: "*.example.com", appMonitorConfiguration: { sessionSampleRate: 1, telemetries: ["errors", "performance", "http"], allowCookies: true, },});Log Retention and Custom Events
Section titled “Log Retention and Custom Events”const monitor = yield* RUM.AppMonitor("SiteMonitor", { domainList: ["example.com", "app.example.com"], cwLogEnabled: true, customEvents: "ENABLED",});