@groundcover/browser 2.1.0-rc.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,37 +4,37 @@ All notable changes to `@groundcover/browser` are documented here. This project
4
4
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and the
5
5
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
6
6
 
7
- ## [2.1.0-rc.1] — 2026-10-07
7
+ ## [2.1.0] — 2026-10-12
8
8
 
9
- Second release candidate of `2.1.0`. Tunes canvas capture's default from measurements; nothing
10
- changes unless `options.replay.canvas.enabled` is set.
9
+ Stable release of the `2.1.0-rc.0` and `2.1.0-rc.1` line. Adds opt-in canvas capture to session
10
+ replay; nothing changes unless `options.replay.canvas.enabled` is set. No breaking changes from
11
+ `2.0.0`.
11
12
 
12
- ### Changed
13
-
14
- - **`replay.canvas.fps` defaults to 1** (was 4). rrweb re-encodes every canvas on every tick whether
15
- or not it changed, so the rate drives CPU even on a static page, while bytes grow only when content
16
- changes. On a six-chart test dashboard, 1 fps used about 12% of a CPU core against about 35% at
17
- 4 fps, with the same bytes. Set `fps` explicitly for animated canvases.
18
- - **README: canvas capture recipes** for dashboards, animated canvases, constrained bandwidth and
19
- CPU-sensitive pages, with measured costs for scale.
20
-
21
- ## [2.1.0-rc.0] — 2026-10-06
22
-
23
- First release candidate of `2.1.0`, on top of `2.0.0`. Adds opt-in canvas capture to session replay;
24
- nothing changes unless `options.replay.canvas.enabled` is set.
13
+ The shipped JavaScript (`index.js`, `index.mjs` and the replay worker) is byte-for-byte rc.1's. The
14
+ type declarations differ from rc.1 only in the `replay.canvas.fps` doc comment. Against `2.0.0`, the
15
+ declarations add `ReplayCanvasOptions` and the optional `replay.canvas` field, and the exported types
16
+ are otherwise unchanged.
25
17
 
26
18
  ### Added
27
19
 
28
20
  - **Session replay can capture `<canvas>`-rendered content** (e.g. chart data series that replayed
29
21
  as empty frames) via `options.replay.canvas`. Off by default. `enabled` maps to rrweb
30
- `recordCanvas`, `fps` (default 4, clamped to 1–15 with a warning) to `sampling.canvas`, and
22
+ `recordCanvas`, `fps` (default 1, clamped to 1–15 with a warning) to `sampling.canvas`, and
31
23
  `imageType` / `imageQuality` (default `image/webp` at 0.6) to `dataURLOptions`. Canvas frames are
32
24
  pixel snapshots: they increase replay bandwidth and page CPU, and are **not** covered by `privacy`
33
25
  text/input masking. WebGL capture is best-effort only (the page's context must use
34
26
  `preserveDrawingBuffer: true`).
27
+ - **`fps` sets CPU cost and time resolution, not bytes.** rrweb re-encodes every canvas on every
28
+ tick whether or not it changed, so the rate drives CPU even on a static page; a frame identical to
29
+ the previous one is dropped, so bytes grow only when content changes. On a six-chart test
30
+ dashboard, 1 fps used about 12% of a CPU core against about 35% at 4 fps, with the same bytes. A
31
+ canvas state shorter than `1/fps` seconds may not appear in the replay, so raise `fps` for
32
+ animated canvases.
35
33
  - **Changing `replay.canvas` through `updateConfig` restarts the active recording**, like
36
34
  `replay.blockedSelectors` and `privacy`. A partial update merges into the current canvas options,
37
35
  so `{ canvas: { fps: 8 } }` keeps capture enabled.
36
+ - **README: canvas capture recipes** for dashboards, animated canvases, constrained bandwidth and
37
+ CPU-sensitive pages, with measured costs for scale.
38
38
 
39
39
  ### Fixed
40
40
 
package/README.md CHANGED
@@ -242,6 +242,11 @@ redraw. Start from the closest recipe and adjust:
242
242
  | Constrained bandwidth | `{ enabled: true, imageQuality: 0.3 }` plus `replay.blockedSelectors` | Lower quality shrinks each image; blocked canvases are skipped entirely. |
243
243
  | CPU-sensitive pages (low-end devices) | `{ enabled: true, imageType: "image/png" }` | PNG encodes much faster than webp but produces about twice the bytes. |
244
244
 
245
+ Capture samples each canvas every `1/fps` seconds and drops a frame that's identical to the
246
+ previous one, so an unchanged canvas sends nothing between full snapshots. The sampling also sets
247
+ the time resolution: a canvas state that lasts less than `1/fps` seconds, such as a brief transition
248
+ or a hover highlight, may not appear in the replay. Raise `fps` when those moments matter.
249
+
245
250
  For scale, on a test dashboard with six canvas charts on a 2× display, canvas capture added about
246
251
  280 KB/min while the charts were static and about 1 MB/min while they refreshed every 10 s. The
247
252
  recorder used about 12% of a CPU core at 1 fps and about 35% at 4 fps, with the same bytes. PNG at
package/dist/index.d.mts CHANGED
@@ -346,8 +346,11 @@ interface ReplayCanvasOptions {
346
346
  * Snapshot frame rate, in frames per second. Defaults to 1 and is clamped to
347
347
  * [1, 15]; out-of-range values are clamped with a `console.warn`. Maps to
348
348
  * rrweb's `sampling.canvas`. Every canvas is re-encoded on every tick, so a
349
- * higher rate costs CPU even when nothing changes; it adds bytes only for
350
- * canvases that change faster than the rate. Raise it for animated canvases.
349
+ * higher rate costs CPU even when nothing changes; frames identical to the
350
+ * previous one are dropped, so it adds bytes only for canvases that change
351
+ * faster than the rate. The rate is also the time resolution: a canvas state
352
+ * shorter than `1/fps` seconds (a brief transition or hover highlight) may not
353
+ * appear in the replay. Raise it for animated canvases.
351
354
  */
352
355
  fps?: number;
353
356
  /**
package/dist/index.d.ts CHANGED
@@ -346,8 +346,11 @@ interface ReplayCanvasOptions {
346
346
  * Snapshot frame rate, in frames per second. Defaults to 1 and is clamped to
347
347
  * [1, 15]; out-of-range values are clamped with a `console.warn`. Maps to
348
348
  * rrweb's `sampling.canvas`. Every canvas is re-encoded on every tick, so a
349
- * higher rate costs CPU even when nothing changes; it adds bytes only for
350
- * canvases that change faster than the rate. Raise it for animated canvases.
349
+ * higher rate costs CPU even when nothing changes; frames identical to the
350
+ * previous one are dropped, so it adds bytes only for canvases that change
351
+ * faster than the rate. The rate is also the time resolution: a canvas state
352
+ * shorter than `1/fps` seconds (a brief transition or hover highlight) may not
353
+ * appear in the replay. Raise it for animated canvases.
351
354
  */
352
355
  fps?: number;
353
356
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundcover/browser",
3
- "version": "2.1.0-rc.1",
3
+ "version": "2.1.0",
4
4
  "description": "groundcover Real User Monitoring (RUM) SDK for the browser \u2014 performance, errors, logs, distributed tracing and session replay",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",