Skip to content

feat(rum): add tab.id to common schema#362

Open
mormubis wants to merge 5 commits intomasterfrom
adlrb/tab-id
Open

feat(rum): add tab.id to common schema#362
mormubis wants to merge 5 commits intomasterfrom
adlrb/tab-id

Conversation

@mormubis
Copy link
Contributor

@mormubis mormubis commented Mar 3, 2026

Motivation

The Browser SDK shares session state across tabs via cookies/localStorage, but has no way to identify which specific tab produced a given event. Adding tab.id enables distinguishing events from different tabs within the same session, enabling tab-level correlation between RUM and Logs.

Reference: browser-sdk#4184

Changes

  • Add optional tab object with required id (UUID) to _common-schema.json, at the top level alongside usr, account, connectivity, etc.
  • Regenerate TypeScript definitions
  • Add samples/rum-events/view-with-tab.json as a sample event exercising the new field

Schema

"tab": {
  "type": "object",
  "description": "Tab properties",
  "required": ["id"],
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of the browser tab",
      "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
      "readOnly": true
    }
  },
  "readOnly": true
}

Notes

  • tab is optional at the top level — only browser emits it; existing non-browser events remain valid
  • id is required when tab is present (consistent with account)
  • additionalProperties: true for future enrichment (consistent with usr and account)

@mormubis mormubis marked this pull request as ready for review March 4, 2026 15:30
@mormubis mormubis requested review from a team as code owners March 4, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants