

The OpenTelemetry community is making significant strides in extending robust observability practices to web-based applications, marked by the establishment of a dedicated Browser Special Interest Group (SIG). This initiative signifies a crucial evolution for OpenTelemetry, originally conceived for backend distributed tracing, as it adapts to become a universal standard across the entire technology stack. The unique, event-driven nature of browser runtimes presents distinct challenges compared to traditional server-side environments, necessitating a re-evaluation of existing tools and methodologies. Experts within the Browser SIG are diligently working to refine the OpenTelemetry API, develop tailored instrumentation, and create new data models that can effectively capture and analyze frontend performance and user interactions, ultimately aiming to provide a more comprehensive understanding of the digital user experience.
While the OpenTelemetry framework has long offered support for JavaScript telemetry collection, its initial architecture was primarily optimized for Node.js, a server-side runtime. This design choice posed inherent limitations when applied to the intricacies of browser environments. The Browser SIG was thus formed to address these specific nuances, focusing on developing superior instrumentation, specialized tooling, and standardized semantic conventions essential for JavaScript applications running in web browsers. Key members of this group recently convened for a comprehensive discussion, highlighting critical issues in browser observability, outlining their ongoing projects, and guiding web developers on how to integrate OpenTelemetry into their workflows.
A central challenge identified by the SIG members is the fundamental difference between server-side and browser runtimes. As Ted Young, a co-founder of OpenTelemetry, elaborated, the resource management and operational characteristics of browsers, mobile devices, and similar environments diverge significantly from server-side operations, making a direct application of existing solutions impractical. The browser's event-driven paradigm, in contrast to a request-driven backend, complicates traditional distributed tracing. Purvi Kanal, a senior software engineer and OpenTelemetry JavaScript approver, explained that browsers handle a multitude of concurrent user interactions—clicks, scrolls, background fetches—generating hundreds of events per second. This rich, continuous stream of data doesn't fit neatly into the conventional start-and-end trace models. Instead, observing frontend applications through the lens of user sessions offers a more meaningful approach, yet OpenTelemetry currently lacks a standardized data model for defining these sessions.
The Browser SIG's immediate focus is not on developing an entirely new JavaScript SDK for browsers, but rather on enhancing the existing OpenTelemetry API, instrumentation, and data model to better suit the browser runtime. Martin Kuba, a staff software engineer at Grafana Labs and OpenTelemetry contributor, emphasized the need to re-evaluate core instrumentation for elements like page load/unload events, user interactions, resource timing, Core Web Vitals, and error reporting. Furthermore, addressing the gaps in the browser data model, particularly by establishing a clear definition for user sessions, is a high priority. Kuba highlighted that a session acts as a connective tissue, linking numerous events, traces, and spans across different user actions and even page navigations. Jared Freeze, a senior software engineer at Embrace, provided an e-commerce example where a user might open multiple product tabs from a homepage, demonstrating the complexity of modeling a continuous user experience within a single session.
The diverse requirements of various web applications mean that engineering teams have distinct observability needs based on their business objectives. The existing OpenTelemetry JavaScript SDK, not being optimized for browsers, often faces challenges, particularly concerning bundle size. Kuba noted the importance of offering developers flexibility to minimize bundle sizes, especially for applications where page load speed is paramount. The SIG is exploring a shift from span-based to event-based instrumentation, hoping to reduce the overall footprint. This strategy would allow developers to selectively include specific event collectors without needing the full tracing SDK, thereby enabling better tree shaking and a more tailored approach to data collection.
For web developers eager to begin using OpenTelemetry today, the existing JavaScript SDK offers a starting point, albeit with some considerations. Context propagation across asynchronous boundaries, for instance, can be complex, often requiring external libraries like zone.js, which itself presents challenges due to its size and maintenance status. Kanal suggested that rather than striving for perfect end-to-end traces that encompass an entire session, developers might find it more effective to link events through well-defined sessions. Kuba advised starting by incorporating the log SDK to generate custom events aligned with evolving semantic conventions. This allows developers to gradually integrate official instrumentation as it becomes available. Key resources for learning more include the official OpenTelemetry website and its demo application, which provides a practical demonstration of various instrumentation types, including browser support. Freeze also recommended the console exporter as a valuable tool for developers to validate their instrumentation directly within the browser, ensuring correct attribute capturing and naming conventions.

Two Decades in Open Source: Lessons on Resilience, Community, and Digital Sovereignty
