rum: fleet RUM init as the ./rum subpath entry (0.47.0, planning#1179 P2) - #49
Conversation
P2 of ADR concepts/fleet-rum (planning#1179): initRum wraps @grafana/faro-web-sdk (declared optional peer) with fleet policy — no-PII (console capture OFF, page.url query stripped via beforeSend), pagehide/visibilitychange/freeze breadcrumbs, unbatched keepalive delivery so a discarded tab keeps its lifecycle evidence, session sampling knob, never-throws init — plus pushApiError for ref-code correlation with the server error view (structural HttpError detection because subpath bundles hold separate class copies). Scratch dir .tmp/ gitignored.
|
Round 2 review fix — a real always-on PII leak found and closed. The security verifier traced (in the installed SDK source) that Faro stamps the live Fix: an Verified-and-held from round 2: Held (not merging): this depends on the ADR (planning#1180) review — won't publish 0.47.0 before the design is ratified. |
Summary
P2 of the fleet RUM initiative (ADR
concepts/fleet-rum, etamong-playground/planning#1179): the fleet wrapper as a new./rumsubpath export (precedent:./helpers,./testing), released as 0.47.0.initRum({ app, version, apiKey, endpoint?, sessionSampleRate? })— wraps@grafana/faro-web-sdkwith the fleet policy baked in: default web instrumentations (errors/rejections, console-error, web vitals, session, view), no-PII (nosetUserpath at all), pagehide/visibilitychange/freeze breadcrumbs (the planning#1176 crash-vs-discard classifier), 1s batch flush so a discarded PWA tab's last events still ship, session sampling default 1.0. SSR-safe + idempotent.pushApiError(err)— wire ascreateFetch'sonError; extracts the 8-hexref/status/url so client events and serverrequest failedlines share one Loki grep surface. Detection is structural (name === "HttpError"), NOTinstanceof: subpath bundles hold separate copies of the class, soinstanceofwould silently never match — caught during implementation, covered by a test.@grafana/faro-web-sdk >=2.9.0is an optional peerDependency and external in tsup — non-adopters install and bundle nothing.요약
fleet RUM wrapper를
./rumsubpath로 추가 (0.47.0).initRum= Faro 초기화 + fleet 정책(no-PII, lifecycle breadcrumb, 1s flush),pushApiError=createFetch onError에 연결하면 서버ref코드와 단일 grep surface. faro-web-sdk는 optional peer라 미채택 앱은 아무것도 설치/번들하지 않습니다.Merge → auto-release가 v0.47.0을 cut/publish합니다 (ci-cut-releases). 채택 순서상 P1 collector(homelab-infra#242)가 먼저 살아있을 필요는 없습니다 — SDK는 POST 실패를 조용히 무시합니다.
Relates to etamong-playground/planning#1179. ADR: etamong-playground/planning#1180.