Skip to content

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.

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,
},
});
const monitor = yield* RUM.AppMonitor("SiteMonitor", {
domainList: ["example.com", "app.example.com"],
cwLogEnabled: true,
customEvents: "ENABLED",
});