@tutti-os/monitoring-web
v0.1.2
Published
Browser monitoring lifecycle and AWS RUM adapter for Tutti web hosts
Keywords
Readme
Browser monitoring
One document-owned createBrowserMonitoring(config) instance per app. Start it before dynamically importing business bootstrap. AWS loads asynchronously; the bounded early queue cannot block the product. null explicitly disables monitoring in local development.
React root callbacks report original errors. Platform forwards its existing diagnostic observers then calls stopGlobalErrorCapture() to avoid a second capture path. Host Account lifecycle calls setIdentity(uid) and setIdentity(null); session metadata snapshots prevent assigning buffered prior-account events to a new account.
markRendered() means React committed the shell; markReady() means the host's explicit state has settled. Neither means Computer/Agent/Room runtime readiness. Navigation starts a new page observation; hidden time is excluded. data-monitoring-empty="true" marks an intentional empty state. DOM content detection reports suspected blank pages, not proof of all visual rendering failures.
100% session sampling; session event limit 1,000; early queue 100. Network blocking and limits can still lose data. Built-in AWS HTTP plugins collect both successes and failures in the configured first-party API scope; a sanitizer at their public plugin boundary drops secrets and URL queries before recording. No replay or X-Ray propagation. HTTP cancellation can be inspected in error details; all failed HTTP events must not be treated as server failures.
Builds use resolveMonitoringConfig from /build with explicit TUTTI_MONITORING_ENVIRONMENT, unique APP_VERSION, and the generated config catalogue. Missing enabled configuration fails the build. The CLI tutti-monitoring-upload-maps DIST BUCKET REPOSITORY/APP/ENV RELEASE uploads private maps and only then removes them from deployable assets.
Run pnpm --filter @tutti-os/monitoring-web test, typecheck, and build. Unit tests observe outbound events through the actual browser lifecycle, replacing only the AWS sink; real browser/AWS acceptance is separately required.
