Topic
Proposal: Standardizing Browser Visibility (Foreground/Background) Attributes and Events in Semantic Conventions
Context
Conversation began in Slack
Web browsers aggressively throttle CPU and network resources for background tabs, which heavily skews performance telemetry. To analyze this accurately, we need a standardized way to capture browser visibility state changes, analogous to how device.app.lifecycle functions for mobile apps.
Modeling Options discussed in Slack
-
Document Entity: Models the browser page/tab as a dynamic, mutable entity. This offers the highest flexibility for capturing active visibility transitions over time.
-
Document Resource: Represents the document as a static resource context. However, this may lack the required flexibility to model real-time state changes.
-
Event Attributes: Appends the visibility state directly to all emitted events. While this simplifies querying and filtering, it significantly increases payload size.
Proposal
We propose introducing an event attribute called browser.document.visibility that can be used for the visibility value (foreground/background).
Topic
Proposal: Standardizing Browser Visibility (Foreground/Background) Attributes and Events in Semantic Conventions
Context
Conversation began in Slack
Web browsers aggressively throttle CPU and network resources for background tabs, which heavily skews performance telemetry. To analyze this accurately, we need a standardized way to capture browser visibility state changes, analogous to how device.app.lifecycle functions for mobile apps.
Modeling Options discussed in Slack
Document Entity: Models the browser page/tab as a dynamic, mutable entity. This offers the highest flexibility for capturing active visibility transitions over time.
Document Resource: Represents the document as a static resource context. However, this may lack the required flexibility to model real-time state changes.
Event Attributes: Appends the visibility state directly to all emitted events. While this simplifies querying and filtering, it significantly increases payload size.
Proposal
We propose introducing an event attribute called
browser.document.visibilitythat can be used for the visibility value (foreground/background).