Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.15] - 2026-08-10

### Fixed

- Web Vitals now emit their core attributes under the `web.vital.*` namespace.
`vital.name`, `vital.value`, `vital.rating`, `vital.id` and
`vital.target_selector` were missing the `web.` prefix that every sibling
attribute (`web.vital.cls.*`, `web.vital.inp.*`, `web.vital.lcp.*`), the
emitted metrics (`web.vital.lcp`, `web.vital.fcp`, …) and the root-span
rollups (`web.vital.<name>.value`) already used. Backends projecting
`web.vital.name`/`value`/`rating` read empty values, so `web_vital` events
rendered without a name or a measurement. The old keys also collided with
the mobile `app_vital` schema, which owns `vital.name` and `vital.type`.

**Breaking for consumers of the old keys:** the previous `vital.*` names are
no longer emitted. Telemetry already ingested keeps the old attribute names.

## [0.1.14] - 2026-08-05

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@base-14/scout-react",
"version": "0.1.14",
"version": "0.1.15",
"description": "Zero-config OpenTelemetry RUM for React and React Native. Auto-captures clicks, navigation, errors, lifecycle, network, performance, and web vitals.",
"license": "MIT",
"author": "base-14",
Expand Down
10 changes: 5 additions & 5 deletions src/core/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ export const ATTR = {
DEVICE_NAME: 'device.name',
SERVICE_NAME: 'service.name',
SERVICE_VERSION: 'service.version',
WEB_VITAL_NAME: 'vital.name',
WEB_VITAL_VALUE: 'vital.value',
WEB_VITAL_RATING: 'vital.rating',
WEB_VITAL_ID: 'vital.id',
WEB_VITAL_TARGET_SELECTOR: 'vital.target_selector',
WEB_VITAL_NAME: 'web.vital.name',
WEB_VITAL_VALUE: 'web.vital.value',
WEB_VITAL_RATING: 'web.vital.rating',
WEB_VITAL_ID: 'web.vital.id',
WEB_VITAL_TARGET_SELECTOR: 'web.vital.target_selector',
WEB_VITAL_CLS_PREVIOUS_RECT_X: 'web.vital.cls.previous_rect.x',
WEB_VITAL_CLS_PREVIOUS_RECT_Y: 'web.vital.cls.previous_rect.y',
WEB_VITAL_CLS_PREVIOUS_RECT_WIDTH: 'web.vital.cls.previous_rect.width',
Expand Down
2 changes: 1 addition & 1 deletion src/core/scope.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const SCOPE_NAME = 'base14.scout.react';
export const SCOPE_VERSION = '0.1.14';
export const SCOPE_VERSION = '0.1.15';
21 changes: 21 additions & 0 deletions src/web/instrumentations/web-vitals.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ describe('installWebVitalsTracker', () => {
expect(spans).toHaveLength(1);
});

// Asserted as literal keys, not via ATTR.*, because these strings are the
// wire contract the backend projects on: renaming a constant must not be
// able to keep this green. `vital.name` in particular belongs to the mobile
// app_vital schema — web vitals must not land in that namespace.
it('names the core attributes under the web.vital namespace', async () => {
await install();
fire('LCP', 2400);

const [span] = recorder.spans().filter((s) => s.name === SPAN.WEB_VITAL);
expect(span.attributes).toMatchObject({
'web.vital.name': 'LCP',
'web.vital.value': 2400,
'web.vital.rating': 'good',
'web.vital.id': 'v1-LCP',
});
expect(Object.keys(span.attributes)).not.toContain('vital.name');
expect(Object.keys(span.attributes)).not.toContain('vital.value');
expect(Object.keys(span.attributes)).not.toContain('vital.rating');
expect(Object.keys(span.attributes)).not.toContain('vital.id');
});

// The observers cannot be torn down, so reinstalling must reuse the existing
// registration rather than stacking another one. Without this, a host that
// mounts the SDK n times reports every subsequent vital n times over.
Expand Down
Loading