@utk09/ui-observability 0.9.3 → 0.9.5
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 +90 -0
- package/README.md +199 -96
- package/dist/batch-BQFtb3i5.cjs +2 -0
- package/dist/batch-BQFtb3i5.cjs.map +1 -0
- package/dist/{batch-DDgxg16_.js → batch-BUJh-1jZ.js} +6 -4
- package/dist/batch-BUJh-1jZ.js.map +1 -0
- package/dist/bus/bus.d.ts +76 -2
- package/dist/bus/links.d.ts +9 -2
- package/dist/bus/validation.d.ts +7 -0
- package/dist/bus-BW6N-pY8.cjs +2 -0
- package/dist/bus-BW6N-pY8.cjs.map +1 -0
- package/dist/bus-DeOPHWaD.js +647 -0
- package/dist/bus-DeOPHWaD.js.map +1 -0
- package/dist/capture/network.d.ts +1 -0
- package/dist/capture/storm.d.ts +2 -1
- package/dist/capture/types.d.ts +5 -0
- package/dist/capture/web-socket.d.ts +40 -0
- package/dist/{console-BSusX_M-.cjs → console-Ce6heqZZ.cjs} +2 -2
- package/dist/console-Ce6heqZZ.cjs.map +1 -0
- package/dist/{console-Dv5GfaNn.js → console-DbAZYJuy.js} +4 -4
- package/dist/console-DbAZYJuy.js.map +1 -0
- package/dist/constants-CN7GE1Lt.js +246 -0
- package/dist/constants-CN7GE1Lt.js.map +1 -0
- package/dist/constants-CW-MlHdY.cjs +2 -0
- package/dist/constants-CW-MlHdY.cjs.map +1 -0
- package/dist/constants.d.ts +63 -11
- package/dist/context-storage-BjzeBSxH.cjs +2 -0
- package/dist/context-storage-BjzeBSxH.cjs.map +1 -0
- package/dist/context-storage-DxZf4Gfh.js +52 -0
- package/dist/context-storage-DxZf4Gfh.js.map +1 -0
- package/dist/core/breadcrumbs.d.ts +10 -3
- package/dist/core/context.d.ts +2 -0
- package/dist/core/diagnostics.d.ts +11 -3
- package/dist/core/journey.d.ts +7 -0
- package/dist/core/meter.d.ts +25 -2
- package/dist/core/pipeline.d.ts +41 -6
- package/dist/core/record.d.ts +42 -9
- package/dist/core/remote-sampling.d.ts +7 -3
- package/dist/core/runtime.d.ts +153 -6
- package/dist/core/sampling.d.ts +35 -2
- package/dist/core/sender.d.ts +43 -1
- package/dist/core/spans.d.ts +34 -0
- package/dist/deadline-5_PecIl5.js +26 -0
- package/dist/deadline-5_PecIl5.js.map +1 -0
- package/dist/deadline-XSnm95pg.cjs +2 -0
- package/dist/deadline-XSnm95pg.cjs.map +1 -0
- package/dist/emergency-queue-BYUyDHGD.js +69 -0
- package/dist/emergency-queue-BYUyDHGD.js.map +1 -0
- package/dist/emergency-queue-Cs1hrjsC.cjs +2 -0
- package/dist/emergency-queue-Cs1hrjsC.cjs.map +1 -0
- package/dist/{errors-DCZWcHkd.js → errors-BhC7HTSt.js} +8 -9
- package/dist/errors-BhC7HTSt.js.map +1 -0
- package/dist/errors-CgY633cG.cjs +3 -0
- package/dist/errors-CgY633cG.cjs.map +1 -0
- package/dist/factory-C5TujXlU.js +280 -0
- package/dist/factory-C5TujXlU.js.map +1 -0
- package/dist/factory-CNj4DH3n.cjs +2 -0
- package/dist/factory-CNj4DH3n.cjs.map +1 -0
- package/dist/fixed-window-CtaFHanJ.js +12 -0
- package/dist/fixed-window-CtaFHanJ.js.map +1 -0
- package/dist/fixed-window-CvESpFYV.cjs +2 -0
- package/dist/fixed-window-CvESpFYV.cjs.map +1 -0
- package/dist/identity-8vKkyAWm.js +103 -0
- package/dist/identity-8vKkyAWm.js.map +1 -0
- package/dist/identity-Da9TkuKd.cjs +2 -0
- package/dist/identity-Da9TkuKd.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +66 -6
- package/dist/index.js +1253 -595
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-storage-BTfIFRHF.cjs +2 -0
- package/dist/indexeddb-storage-BTfIFRHF.cjs.map +1 -0
- package/dist/{indexeddb-storage-T9YIYVYC.js → indexeddb-storage-CCA1LvtO.js} +45 -30
- package/dist/indexeddb-storage-CCA1LvtO.js.map +1 -0
- package/dist/{interactions-BLH_tX87.js → interactions-BUDLxbv1.js} +16 -12
- package/dist/interactions-BUDLxbv1.js.map +1 -0
- package/dist/interactions-NHbLKrqe.cjs +2 -0
- package/dist/interactions-NHbLKrqe.cjs.map +1 -0
- package/dist/{journey-yALMEWF7.js → journey-BUJ4WJxP.js} +37 -34
- package/dist/journey-BUJ4WJxP.js.map +1 -0
- package/dist/journey-B_tTnvac.cjs +2 -0
- package/dist/journey-B_tTnvac.cjs.map +1 -0
- package/dist/keys-BHhw_0Wh.cjs +2 -0
- package/dist/keys-BHhw_0Wh.cjs.map +1 -0
- package/dist/keys-D5r_GH9q.js +17 -0
- package/dist/keys-D5r_GH9q.js.map +1 -0
- package/dist/{library-request-CQD4HUiP.js → library-request-BKOcaKtQ.js} +3 -3
- package/dist/{library-request-CQD4HUiP.js.map → library-request-BKOcaKtQ.js.map} +1 -1
- package/dist/{library-request-BcAxuwsf.cjs → library-request-BaZOi4eg.cjs} +2 -2
- package/dist/{library-request-BcAxuwsf.cjs.map → library-request-BaZOi4eg.cjs.map} +1 -1
- package/dist/{long-frames-D4Bm3Zkz.cjs → long-frames-CF3qiSAX.cjs} +2 -2
- package/dist/long-frames-CF3qiSAX.cjs.map +1 -0
- package/dist/{long-frames-DD_Um9_4.js → long-frames-DI5ypfAF.js} +5 -5
- package/dist/long-frames-DI5ypfAF.js.map +1 -0
- package/dist/models/batch.d.ts +4 -0
- package/dist/models/bus.d.ts +32 -9
- package/dist/models/config.d.ts +401 -12
- package/dist/models/drop.d.ts +1 -1
- package/dist/models/health.d.ts +27 -0
- package/dist/models/log-record.d.ts +1 -1
- package/dist/models/plugin.d.ts +47 -0
- package/dist/models/stats.d.ts +11 -0
- package/dist/models/storage.d.ts +13 -0
- package/dist/network-CF8UO5PK.cjs +2 -0
- package/dist/network-CF8UO5PK.cjs.map +1 -0
- package/dist/{network--GoE7_Or.js → network-DdzXDI3J.js} +47 -31
- package/dist/network-DdzXDI3J.js.map +1 -0
- package/dist/openfin-BwEN0uj4.js.map +1 -1
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/{platform-GaM6h7XM.js → platform-Bw1btWCT.js} +21 -10
- package/dist/platform-Bw1btWCT.js.map +1 -0
- package/dist/platform-DBSKTvFn.cjs +2 -0
- package/dist/platform-DBSKTvFn.cjs.map +1 -0
- package/dist/remote-rules-DIcC5vVC.js +91 -0
- package/dist/remote-rules-DIcC5vVC.js.map +1 -0
- package/dist/remote-rules-DpFmOef2.cjs +2 -0
- package/dist/remote-rules-DpFmOef2.cjs.map +1 -0
- package/dist/sampling-BVjspJWu.cjs +2 -0
- package/dist/sampling-BVjspJWu.cjs.map +1 -0
- package/dist/sampling-Cm3WhI0a.js +76 -0
- package/dist/sampling-Cm3WhI0a.js.map +1 -0
- package/dist/{sanitize-DP0xDPrt.js → sanitize-C-ahCFsG.js} +2 -2
- package/dist/{sanitize-DP0xDPrt.js.map → sanitize-C-ahCFsG.js.map} +1 -1
- package/dist/{sanitize--_e4oOPX.cjs → sanitize-DHucKGdi.cjs} +2 -2
- package/dist/{sanitize--_e4oOPX.cjs.map → sanitize-DHucKGdi.cjs.map} +1 -1
- package/dist/sender-D3fRCR8d.cjs +3 -0
- package/dist/sender-D3fRCR8d.cjs.map +1 -0
- package/dist/sender-DUUmSglb.js +1163 -0
- package/dist/sender-DUUmSglb.js.map +1 -0
- package/dist/storage/context-storage.d.ts +89 -0
- package/dist/storage/emergency-queue.d.ts +9 -1
- package/dist/storage/factory.d.ts +7 -1
- package/dist/storage/idb-driver.d.ts +13 -0
- package/dist/storage/indexeddb-storage.d.ts +13 -0
- package/dist/storage/local-storage.d.ts +21 -1
- package/dist/storage/memory-storage.d.ts +13 -0
- package/dist/storage-BA9RqRO-.cjs +2 -0
- package/dist/storage-BA9RqRO-.cjs.map +1 -0
- package/dist/storage-w7Tslvlq.js +17 -0
- package/dist/storage-w7Tslvlq.js.map +1 -0
- package/dist/storm-CNZjsw4T.cjs +2 -0
- package/dist/storm-CNZjsw4T.cjs.map +1 -0
- package/dist/storm-Daq2jGHU.js +10 -0
- package/dist/storm-Daq2jGHU.js.map +1 -0
- package/dist/transport/exit-flush.d.ts +6 -0
- package/dist/transport/http-transport.d.ts +2 -1
- package/dist/transport/retry-engine.d.ts +7 -2
- package/dist/transport/serializers/otlp-traces.d.ts +3 -0
- package/dist/transport/serializers/select.d.ts +8 -5
- package/dist/transport/status-transport.d.ts +24 -0
- package/dist/types-BR9t_w28.js +8 -0
- package/dist/types-BR9t_w28.js.map +1 -0
- package/dist/types-C7WNpnG1.cjs +2 -0
- package/dist/types-C7WNpnG1.cjs.map +1 -0
- package/dist/utils/fixed-window.d.ts +9 -0
- package/dist/utils/identity.d.ts +20 -2
- package/dist/utils/lock.d.ts +8 -0
- package/dist/utils/openfin.d.ts +1 -1
- package/dist/utils/platform.d.ts +10 -0
- package/dist/utils/tracing.d.ts +82 -4
- package/dist/web-socket-BacvKOvD.cjs +2 -0
- package/dist/web-socket-BacvKOvD.cjs.map +1 -0
- package/dist/web-socket-CpsD8WAa.js +105 -0
- package/dist/web-socket-CpsD8WAa.js.map +1 -0
- package/package.json +1 -1
- package/dist/batch-D5qvsMQ_.cjs +0 -2
- package/dist/batch-D5qvsMQ_.cjs.map +0 -1
- package/dist/batch-DDgxg16_.js.map +0 -1
- package/dist/bus-C6RwKzPW.js +0 -478
- package/dist/bus-C6RwKzPW.js.map +0 -1
- package/dist/bus-WPVDFw2y.cjs +0 -2
- package/dist/bus-WPVDFw2y.cjs.map +0 -1
- package/dist/console-BSusX_M-.cjs.map +0 -1
- package/dist/console-Dv5GfaNn.js.map +0 -1
- package/dist/constants-Cb92egPS.cjs +0 -2
- package/dist/constants-Cb92egPS.cjs.map +0 -1
- package/dist/constants-DhH6VI5a.js +0 -144
- package/dist/constants-DhH6VI5a.js.map +0 -1
- package/dist/deadline-CUrH0Hd8.cjs +0 -2
- package/dist/deadline-CUrH0Hd8.cjs.map +0 -1
- package/dist/deadline-DeqXEliN.js +0 -31
- package/dist/deadline-DeqXEliN.js.map +0 -1
- package/dist/errors-DCZWcHkd.js.map +0 -1
- package/dist/errors-ERu-su8m.cjs +0 -3
- package/dist/errors-ERu-su8m.cjs.map +0 -1
- package/dist/fixed-window-BR0bu32Y.cjs +0 -2
- package/dist/fixed-window-BR0bu32Y.cjs.map +0 -1
- package/dist/fixed-window-Re7jIRJH.js +0 -9
- package/dist/fixed-window-Re7jIRJH.js.map +0 -1
- package/dist/identity-C1WLItSl.cjs +0 -2
- package/dist/identity-C1WLItSl.cjs.map +0 -1
- package/dist/identity-Di-QXGCC.js +0 -88
- package/dist/identity-Di-QXGCC.js.map +0 -1
- package/dist/indexeddb-storage-DX18p39D.cjs +0 -2
- package/dist/indexeddb-storage-DX18p39D.cjs.map +0 -1
- package/dist/indexeddb-storage-T9YIYVYC.js.map +0 -1
- package/dist/interactions-BLH_tX87.js.map +0 -1
- package/dist/interactions-_hfOerfC.cjs +0 -2
- package/dist/interactions-_hfOerfC.cjs.map +0 -1
- package/dist/journey-BRUj0hqD.cjs +0 -2
- package/dist/journey-BRUj0hqD.cjs.map +0 -1
- package/dist/journey-yALMEWF7.js.map +0 -1
- package/dist/long-frames-D4Bm3Zkz.cjs.map +0 -1
- package/dist/long-frames-DD_Um9_4.js.map +0 -1
- package/dist/network--GoE7_Or.js.map +0 -1
- package/dist/network-DcuS2H1P.cjs +0 -2
- package/dist/network-DcuS2H1P.cjs.map +0 -1
- package/dist/platform-GaM6h7XM.js.map +0 -1
- package/dist/platform-kIL5AZB7.cjs +0 -2
- package/dist/platform-kIL5AZB7.cjs.map +0 -1
- package/dist/remote-rules-6ePq8CrI.js +0 -84
- package/dist/remote-rules-6ePq8CrI.js.map +0 -1
- package/dist/remote-rules-CI3gbRCL.cjs +0 -2
- package/dist/remote-rules-CI3gbRCL.cjs.map +0 -1
- package/dist/sampling-C-M8p3FK.cjs +0 -2
- package/dist/sampling-C-M8p3FK.cjs.map +0 -1
- package/dist/sampling-Ud_WiuU9.js +0 -65
- package/dist/sampling-Ud_WiuU9.js.map +0 -1
- package/dist/sender-BESHz6my.cjs +0 -3
- package/dist/sender-BESHz6my.cjs.map +0 -1
- package/dist/sender-BUBWLn5i.js +0 -1244
- package/dist/sender-BUBWLn5i.js.map +0 -1
- package/dist/storm-DhHGHhOc.cjs +0 -2
- package/dist/storm-DhHGHhOc.cjs.map +0 -1
- package/dist/storm-OD5J6Ylm.js +0 -10
- package/dist/storm-OD5J6Ylm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,96 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.9.5] - 2026-11-01
|
|
6
|
+
|
|
7
|
+
### Added - v0.9.5
|
|
8
|
+
|
|
9
|
+
- `rotateSecurityContext(update, options?)` changes the delivery identity and settings together. The `pending` rule is `"discard"`, `"flush"`, `"retain"` or `"carry"`. The default is `"discard"`. `"carry"` moves each stored batch to the new id with no attempts. The retry engine sends it. Logger calls during this step go to the new context. Without a new destination, the stored batches stay parked under the old id. `newSession()` stays a correlation change. Use awaited rotation for logout or tenant changes.
|
|
10
|
+
- `lockConfiguration` refuses changes through `configure()`. Identical repeated settings are accepted. `setConfigurationLocked(false)` permits changes again. Explicit context rotation stays available while configuration is locked.
|
|
11
|
+
- `getHealth()` reports SDK versions, runtime state, delivery role and counts, configuration lock state, cache usage and security/bus policies. Version conflicts and context conflicts have machine-readable issue codes. A configured console-only runtime can report `"ready"`.
|
|
12
|
+
- `registerFrame(frame, options)` binds a child window to an exact origin and source permissions. It accepts an iframe element or a `Window`, also a cross-origin one. `registerWorker(worker, options?)` now accepts permissions. Both functions return a function that removes the registration. The default permission is `"records"`. Journey and sampling access need separate permissions.
|
|
13
|
+
- `bus.sourcePolicy`, `bus.validation` and bus budgets control source checks, message checks, message bytes, record counts, message rates and named source tracking. A registration binds its exact origin under each source policy. Limits can be disabled where documented.
|
|
14
|
+
- `loggerCache.maxEntries` sets the LRU logger cache limit. The default is 256. Set 0 for no cache or null for no limit. A logger that the app holds stays valid after removal from the cache.
|
|
15
|
+
- `delivery` sets request timeouts, request concurrency, retry delays and the number of batches in one stored delivery pass.
|
|
16
|
+
- `buffering` sets live record and encoded-byte limits. Its overflow rule removes old records, drops new records or tries storage. A record larger than the byte limit is dropped alone. The storage rule permits only one overflow write at a time.
|
|
17
|
+
- `metrics` sets limits for instrument names, attribute sets and histogram boundaries. `correlation` sets session and trace timing. Correlation settings take effect at startup.
|
|
18
|
+
- `capturePolicy` sets breadcrumb capacity, error duplicate checks, capture rate limits and the pipeline error ceiling. `diagnostics` sets the report interval and the console fallback rule.
|
|
19
|
+
- `persistence.namespace` separates application batch stores, emergency queues and retry lock names. It takes effect at startup. `clearPersistedLogs()` removes the stored records of the active context. `clearPersistedLogs("namespace")` removes the stored records of all contexts in that namespace. Pending requests can store records again after removal.
|
|
20
|
+
- `metadata` controls page URL, user agent and OpenFin resource fields. `capture.urlTransform` replaces the default URL formatting rule. It receives the original URL. Null, an invalid result or an exception gives an empty URL. An exception reports `capture.record_failed`.
|
|
21
|
+
- Custom transport requests include `signal` and `routingContextId`. A custom transport must check the signal to cancel its own work when the old context stops.
|
|
22
|
+
|
|
23
|
+
### Changed - v0.9.5
|
|
24
|
+
|
|
25
|
+
- Enabled click capture records a stable `data-observability-action` value, or `"unknown-click"`, by default. `capture.interactions.actionAttribute` selects another attribute, for example `data-testid`. It does not record text or selectors. The object form of `capture.interactions` can enable those details. Selectors are in `breadcrumb.data.selector`. `ignoreSelector: null` permits capture in all regions.
|
|
26
|
+
- Delivery is isolated by context by default. Replay after a page reload requires an explicit stable `securityContext.id`. Batches from other contexts and old batches without an id stay stored. Storage retention and capacity limits still apply to them. Set `securityContext.isolation: false` to permit cross-context replay and ordinary delivery reconfiguration.
|
|
27
|
+
- With isolation enabled, changes to delivery settings or identity use `rotateSecurityContext()` instead of `configure()`. `configure()` keeps the delivery settings in force, reports `config.invalid` and applies its other settings. Delivery fields not supplied during rotation reset to their defaults. Old credentials and signal endpoints are not retained. Calls logged during rotation are dropped and counted.
|
|
28
|
+
- Child-frame forwarding requires registration by default, including the same-origin direct path. Select `bus.sourcePolicy: "trusted-origin"` to permit automatic source discovery by origin. Message validation defaults to `"strict"`.
|
|
29
|
+
- Bus messages use the envelope tag `ui-observability/2` and longer type names, for example `ui-observability.message.hello`. A frame on an earlier version ignores them. Load the same library version in each frame.
|
|
30
|
+
- The owner sends a new delivery identity to registered frames, workers and OpenFin views. A forwarder that knows its owner welcomes its own children. It relays their records. It sends them the identity of its owner. The first identity that a forwarder takes keeps its startup records. When the owner identity later changes, a forwarder clears its buffered records, also before startup completes. `onDrop` reports them with `security_context`.
|
|
31
|
+
- Live delivery buffers default to 10,000 records and 16 MiB of encoded JSON, with `"drop-oldest"` overflow. Metric instrument names default to a limit of 1,000 per collection interval. Extra instrument names are dropped and counted. Set the corresponding limit to 0 for no limit.
|
|
32
|
+
- `capturePolicy.breadcrumbs: 0` disables breadcrumb storage. Before, a zero capacity kept one breadcrumb.
|
|
33
|
+
- Diagnostic console fallback is off by default. When enabled, it prints a fixed warning if `onDiagnostic` throws. It does not print the exception, message or stack.
|
|
34
|
+
- `capture.urlTransform` also applies to WebSocket URLs. Without it, a socket URL still has no query or fragment, also with `capture.fullUrls`.
|
|
35
|
+
- IndexedDB schema version 12 adds a context/time index. Context reads and counts no longer load batches of other contexts.
|
|
36
|
+
- The size budget of the main graph is 36,000 B to include the operational controls.
|
|
37
|
+
- See [runtime policies and migration](docs/runtime-policies.md) for defaults, overrides, update timing and upgrade steps.
|
|
38
|
+
|
|
39
|
+
### Fixed - v0.9.5
|
|
40
|
+
|
|
41
|
+
- Console output below the delivery level or outside the sample now passes through configured processors and redaction. Sampled-out breadcrumbs use the processed message too. Hooks can run without a telemetry send. A local record is not processed twice for console output.
|
|
42
|
+
- Old queued records cannot use a new delivery context when isolation is enabled. Context ids stay with batches through storage, retries and splitting. Old HTTP requests are cancelled where possible. A request that the server already accepted cannot be recalled.
|
|
43
|
+
- HTTP capture ignores completions from an old security context. WebSocket capture also checks the context that opened each socket before it records lifecycle events or message counts.
|
|
44
|
+
- Retained memory queues survive context rotation. A slow save that completes after a discard removes its old batch. A rejected rotation no longer causes a later shutdown to reject.
|
|
45
|
+
- Incoming and outgoing bus controls check source permissions. Changing a self-reported context id does not reset the physical source's rate budget.
|
|
46
|
+
- The owner answers a hello, a journey question or a sampling question only to the child that asked. Before, each known child frame received each answer.
|
|
47
|
+
- The cross-origin playground server sets the library version value. Before, its child frame stopped with a `ReferenceError` at load.
|
|
48
|
+
- Lint rejects empty named imports and continues to permit imports that run a module for its side effects.
|
|
49
|
+
|
|
50
|
+
## [0.9.4] - 2026-10-31
|
|
51
|
+
|
|
52
|
+
### Added - v0.9.4
|
|
53
|
+
|
|
54
|
+
- `startJourney(name, { id })` sets the journey id. An id of 1 to 64 letters, digits, `_`, `.`, `:` or `-` stays. Another value gives a new id and a `config.invalid` report.
|
|
55
|
+
- `addBreadcrumb(message, data?)` adds a breadcrumb with the category `custom`. The library copies `data` at the call.
|
|
56
|
+
- `minLevels` sets a minimum level for each namespace prefix, for example `{ "trading.ticks": "DEBUG" }`. The longest prefix that matches at a dot wins. A namespace with no match uses `minLevel`. A new map replaces the map in force.
|
|
57
|
+
- Remote sampling rules can have `minLevels`, with at most 100 prefixes. A remote prefix wins over the remote `minLevel`. A remote level only lowers the level of a namespace.
|
|
58
|
+
- `contextProvider()` gives attributes for each record that sampling keeps. Its values override `setContext()` values. The logger scope and the call payload override its values. A provider that throws reports `handler.threw`. A value that is not an object reports `config.invalid`. The record is still built.
|
|
59
|
+
- `getStats()` gives `{ pending, inFlight, stored, lastSendAt }`. `pending` counts the records in the buffers. `inFlight` counts the records in requests. `stored` counts the batches in storage. `lastSendAt` is the time of the last batch that the server accepted. A forwarder reports only its own buffers. The package exports the type `DeliveryStats`.
|
|
60
|
+
- `newSession()` starts a new session in this tab, for example after a logout. It sends the open metric points, ends the active trace and journey, clears the breadcrumbs and writes the new id to `localStorage`. Other tabs read the new id at their next startup. A tab does not write its old id over the new id.
|
|
61
|
+
- `processors` is a list of functions that change or drop a record. They run in list order, before `redact`. A processor has the contract of `redact`. A processor that throws or returns a value that is not a record drops the record. The diagnostic code `record.dropped_by_processor` counts the drops.
|
|
62
|
+
- `capture.plugins` adds capture modules of the app. A plugin has `name`, `install(ctx)` and `uninstall()`. `ctx` gives `logger`, `counter()`, `histogram()`, `addBreadcrumb()` and `ownRequest(fn)`. The logger namespace is `uiobs.capture.<name>`. A plugin that throws in `install()` or `uninstall()` reports `capture.install_failed`. The package exports the types `CapturePlugin` and `PluginContext`.
|
|
63
|
+
- `capture.webSocket` records `websocket.open`, `websocket.close` and `websocket.error` for each WebSocket, with `url.full` and `server.address`. The URL has no user info, no query and no fragment. The counter `ui.websocket.messages` counts the messages by `network.io.direction` and `server.address`. The library never reads the content of a message. It records at most 20 lifecycle records in each 10-second window. It skips a socket in `capture.ignoreUrls`, and does not count a send of the library. `instanceof WebSocket` stays true for a socket that the app opened before the capture loaded. The capture loads as a separate chunk.
|
|
64
|
+
- `tracesEndpoint` sets an OTLP traces endpoint, for example `https://ingest.example/v1/traces`. With it, the library sends spans as an OTLP `ExportTraceServiceRequest`. Without it, the library sends no span. It needs `serializer: "otlp"`, and `endpoint` or `transport`. A batch of spans without `tracesEndpoint` counts `record.dropped_no_destination`.
|
|
65
|
+
- Each trace of the library has one root span. It ends when the trace rotates, at the exit flush, at `shutdown()` and, in a frame or a view that forwards its records, on `pagehide`. Its name is `ui.start`, `ui.interaction`, `ui.navigation` or `ui.trace`.
|
|
66
|
+
- Each `fetch` or XHR request that gets `traceparent` has one CLIENT span. The `traceparent` names the client span. The root span is its parent.
|
|
67
|
+
- `sampling.defaultRate` samples each trace by its trace id. The whole trace stays or goes. For a trace that sampling drops, `traceparent` has the sampled flag off. `minLevel` does not apply to a span. The library sends no span for a trace from the OpenTelemetry API.
|
|
68
|
+
- Spans go through `processors` and `redact`. The console does not print them. At exit, the logs get the beacon budget before the spans.
|
|
69
|
+
- `request.kind` of a custom transport is `"traces"` for a batch of span records.
|
|
70
|
+
- The ECS serializer writes `ecs.version` (`8.10.0`), `log.logger`, `event.kind` and `error.type`, `error.message` and `error.stack_trace`.
|
|
71
|
+
- On Node, the library runs console-only. It installs no capture, keeps the ids in memory, uses no storage and has no exit flush. If you set `endpoint`, `metricsEndpoint`, `tracesEndpoint` or `transport`, it reports `config.invalid` one time.
|
|
72
|
+
- `tools/reference-collector.mjs` is a reference ingest server with no dependencies. It implements each rule of the ingest contract, deduplicates for 24 hours and can forward to an OTLP collector. It listens on `127.0.0.1` by default, limits the rate of each client address and limits the body size after gzip decoding. It is not part of the package.
|
|
73
|
+
- The mock ingest server accepts `/v1/traces` and prints each span.
|
|
74
|
+
- The documents `docs/attributes.md`, `docs/browser-support.md` and `docs/threat-model.md`.
|
|
75
|
+
- The README tells that each top-level tab sends its own records.
|
|
76
|
+
|
|
77
|
+
### Changed - v0.9.4
|
|
78
|
+
|
|
79
|
+
- The type `LogType` has the new value `"span"`. The type `BatchKind` has the new value `"traces"`.
|
|
80
|
+
- The sender runs its `redact` on each record from a frame or a worker. A context that never calls `configure()` then cannot send a raw record. Write `redact` so that a second run gives the same result.
|
|
81
|
+
- A `redact` hook that changes a record in place now gets the sanitizer and the size limit. Before, only a new record from the hook got them.
|
|
82
|
+
- With `processors` or `redact`, a record from before startup no longer gets `journey.id` and `journey.name` after the hooks ran.
|
|
83
|
+
- The library removes the user info, for example `user:pass@`, from each URL that it records, also with `capture.fullUrls`. `error.source` follows `capture.fullUrls`.
|
|
84
|
+
- With `storage: "memory"` or `"none"`, the exit flush does not use the emergency queue in `localStorage`. A batch that it cannot send is lost, and `onDrop` reports `not_stored`.
|
|
85
|
+
- `adoptJourney()` refuses a token without a start time, or with a start time more than 5 minutes ahead.
|
|
86
|
+
- A tab no longer writes its session id over a newer session id of another tab that has not expired.
|
|
87
|
+
- The ECS serializer moves `app.namespace` and the string `error.type`, `error.message` and `error.stack_trace` attributes out of `labels`. The other attributes stay in `labels`.
|
|
88
|
+
- A console-only runtime next to another version of the library also ignores `metricsEndpoint` and `tracesEndpoint`.
|
|
89
|
+
- The size budget of the main graph is 32,200 B.
|
|
90
|
+
|
|
91
|
+
### Fixed - v0.9.4
|
|
92
|
+
|
|
93
|
+
- A reused XHR sent a second record for its earlier request at each later send.
|
|
94
|
+
|
|
5
95
|
## [0.9.3] - 2026-10-31
|
|
6
96
|
|
|
7
97
|
### Fixed - v0.9.3
|