Releases: 1patch/rum
Release list
v0.3.0 — a page asset earns its span
Fast page assets no longer get a span.
A page load emits one resourceFetch span per stylesheet, font and chunk — seven of every eleven page-load spans on our own app, and on a warm cache the same seven near-instant hits recorded again on every visit by every visitor. documentLoad already reports that the page took 1.6 seconds; an asset span earns its storage when it says which font that was.
assetFloorMs (default 100) drops fast, successful asset spans as the batch leaves the browser. An asset that failed is always kept, however fast it failed — that is the case worth looking at, and Resource Timing leaves no status code to find it by afterwards. A span that isn't recognisably a timed asset is never dropped.
assetFloorMs: 0 restores 0.2.1 behaviour. No other API change.
v0.2.1 — page-load spans carry the person
Fix: the spans from a page's first moments now carry the person.
0.2.0 held the first batch of spans until identity resolved, which was necessary and not sufficient. The underlying OpenTelemetry web SDK copies global attributes onto a span when the span starts, so documentLoad, documentFetch, resourceFetch and webvitals — all of which start before any session request can have answered — went out anonymous no matter how long their batch waited. Verified on a deployed app, which is the only place it shows.
The exporter now fills identity in as the batch leaves, for keys a span is missing. A span that started after a later identifyUser keeps the person it was created under.
No API change. Upgrading from 0.2.0 is a version bump.
v0.2.0 — identity is required
Breaking: user is now a required option.
startRum({
…,
user: async () => (await getSession())?.user ?? null,
});Pass the person ({ id, email }), a resolver awaited once at startup, or the literal "anonymous" for an app with no sign-in. (await startRum(…)).identified tells you whether anyone was attached.
Identity used to be a second call you could forget, which is exactly what happened to us: a week of our own browser spans with nobody on them. RUM whose spans have no user answers "what happened on the site" and never "what did this person do".
Two smaller fixes that follow from it:
- The first batch of spans waits up to three seconds for identity, so page-load spans carry the person too. The wait ends early on a settled identity or a page leaving, so it never costs telemetry.
identifyUserfields acceptnullto clear a key — previously the type didn't allow it. An absent key still means "leave what was set", soidentifyUser({ id })after a workspace switch keeps the oldorg.id.
Migrating from 0.1.x: add user to your startRum call. Keep identifyUser for changes after startup.
v0.1.1
v0.1.0
What's Changed
- fix: keep query strings, and stop double-stamping env and version by @duci9y in #3
- docs: SECURITY.md said the opposite of what the code now does by @duci9y in #4
- legal: the copyright holder is Damasqas, Corp. by @duci9y in #5
New Contributors
Full Changelog: https://github.com/1patch/rum/commits/v0.1.0