Skip to content

Should we support browser visibility attribute data? #377

Description

@MaesterChestnut

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions