Enhancing React Ecosystems with Observability: A Deep Dive into React with OpenTelemetry

This ad is not shown to multipass and full ticket holders
React Advanced
React Advanced 2026
October 23 - 26, 2026
London, UK & Online
Upcoming event
React Advanced 2026
React Advanced 2026
October 23 - 26, 2026. London, UK & Online
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Get started

This talk will guide you through the integration of OpenTelemetry within React environments, emphasizing Server Side Rendering (SSR) and the innovative React Server Components (RSC). Learn how to harness the power of telemetry data—traces, metrics, and logs—to gain a comprehensive understanding of your application's behavior and user interactions.

This talk has been presented at React Summit 2024, check out the latest edition of this React Conference.

FAQ

Monitoring is the process of collecting, analyzing, and using information to track progress and reach goals, essentially telling you what is happening. Observability, on the other hand, is the ability to understand a system's internal state by analyzing the data it generates, explaining why it behaves a certain way.

OpenTelemetry focuses on three major types of telemetry data: logs, metrics, and traces. Logs capture events, metrics measure things like CPU usage, and traces track the user journey through various services.

In OpenTelemetry, logs are referred to as log records, which consist of fields like timestamp, trace ID, span ID, and the log body. These log records follow consistent semantics across different programming languages.

A trace in OpenTelemetry represents the user journey of a specific event, such as an API call. Each trace has a unique trace ID and can consist of multiple span IDs, which represent individual operations like database calls or function executions.

Context propagation in distributed tracing is the process of carrying trace information across different services. This is done using headers like the W3C trace context header, which includes components like version, trace ID, span ID, and sampling status.

The OpenTelemetry collector is a component that receives, processes, and exports telemetry data. It helps reduce costs by filtering and routing data efficiently, and can send logs to various storage solutions like low-cost file storage or specialized log management systems.

OpenTelemetry can help in debugging errors by providing detailed traces and span events that highlight where and why an error occurred. This allows for easier pinpointing of issues without deep knowledge of the code.

Collecting excessive telemetry data can lead to high storage costs. OpenTelemetry allows you to mitigate this by using collectors to filter and sample data, ensuring only relevant information is stored.

OpenTelemetry in the browser is still experimental. It typically assigns a unique trace to each user interaction, like page reloads or API calls, and uses key attributes to link these traces.

OpenTelemetry is a set of APIs, libraries, agents, and instrumentation that aim to standardize the generation and collection of telemetry data like logs, metrics, and traces. It helps in observability by focusing on generating and processing telemetry data, leaving storage and analysis to vendors.

Jan Peer Stöcklmair
Jan Peer Stöcklmair
22 min
18 Jun, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The video explores the concept of observability in React ecosystems by diving into OpenTelemetry, which is essential for understanding system states through generated data. OpenTelemetry React integration focuses on three types of telemetry data: logs, metrics, and traces. React OpenTelemetry implementation is experimental in browsers, allowing each user interaction to be treated as a separate trace, aiding in debugging. React distributed tracing is crucial for connecting traces across different services using context propagation, which involves headers like the W3C trace context header. The talk also discusses how React complexity increases with server components, highlighting the role of OpenTelemetry in managing these complexities. OpenTelemetry React integration is beneficial for tracking user journeys and optimizing page load times, especially in applications using frameworks like Next.js. The OpenTelemetry collector is emphasized for its role in processing and exporting telemetry data efficiently, which can help reduce storage costs. The video also covers how OpenTelemetry can assist in debugging errors by providing detailed traces and span events, making it easier to pinpoint issues. The talk highlights the importance of context propagation in distributed tracing for understanding service calls and reducing costs.

1. Introduction to Observability and OpenTelemetry

Short description:

Hi, I'm Jan. Today I'm going to talk about the difference between monitoring and observability, and dive deep into OpenTelemetry and its distributed tracing. Observability is the ability to understand the system's internal state by analyzing generated data. OpenTelemetry focuses on generating and processing data, while storing and analyzing are handled by vendors. OpenTelemetry also focuses on three major telemetry data: logs, metrics, and traces. Logs consist of field names like timestamp, trace ID, span ID, and body. Metrics show CPU usage for a specific time frame.

Hi, I'm Jan. Have you ever had the situation where you got a bug ticket and it stated there was an empty screen on some customer, and you had to debug this, but there was no way of finding the root cause? Well, this shouldn't be the case. And this is why I show you how to enhance the React ecosystems with observability and how OpenTelemetry will help you in that journey.

So today I'm going to talk about the difference between monitoring and observability. I will also dive deep into OpenTelemetry and its distributed tracing, and then we'll show you a quick demo of how things work together.

So what is now the difference between monitoring and observability? Well, monitoring is the process of collecting, analyzing and using the information to track some progress, to reach the goals or to guide management decisions. So it's really stating what is happening. Just imagine Google Analytics. It shows you how many users are on this page or how many users got dropped off on another page. And based on this information, you can guide some new features. Right. So you really know what is happening. For example, if there is a bug, if there is a error showing up, it shows you what is happening, but it doesn't really tell you the root cause. So it doesn't really help you a lot.

And this is why observability is very important. So observability is the ability to understand the system's internal state by just analyzing the data it generates, such as logs, metrics and traces. So it shows you why does it behave like that. And this is very important. Traditionally, there are four major problems, generating the data, processing it, storing and analyzing. Usually this comes in one end-to-end solution. So if you want to change the store or analyze mechanism, you have to change the entire process. OpenTelemetry knows that and they actually only focusing on the first two problems, generating and processing the data. Storing and analyzing would be done on the vendors, on the vendors' shoulders. OpenTelemetry is also focusing on three major telemetry data, logs, metrics and traces.

Focusing on logs right now, these were the most important ones and the most hardest ones to implement, actually, because there were so many different implementations across all languages and OpenTelemetry is actually making one consistent semantics for all of the languages. When we talk about logs in OpenTelemetry, we actually mean log records and one log record is actually consisting of these field names like the timestamp, a trace ID, span ID and even the body, which is the most important part. I will talk more about the trace IDs and span IDs in the trace section. The metrics are a little different. Metrics are basically showing you how much, for example, a CPU usage would be for a specific time frame. Metrics in OpenTelemetry are also called meters and instruments, where one instrument would be one data point in a specific point in time.

2. Understanding Traces and Span IDs

Short description:

So how much CPU does it take right now? A trace is the user journey of a specific event, like an API call. Each trace ID consists of multiple span IDs, which represent different function calls. Span events are logs that occur at specific times on the span ID.

So how much CPU does it take right now? A meter is something like a grouping, so it groups multiple instruments and you can, of course, have multiple groupers. The traces are, again, a little different. So what is a trace? A trace is basically the user journey of one specific event. For example, in this case, an API call. If somebody calls an API, you get a specific trace ID, which is only made for this specific event. And each trace ID consists of multiple span IDs. One span ID could be a database call or another function call. So this could be very random. Each span ID or trace ID can also hold key attributes, which you can just define. On top of the span IDs, there are also span events. A span event is something like a log, which just happens at a specific point in time on the span ID. I will show you later in the demo what a span event could look like.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Simplifying Server Components
React Advanced 2023React Advanced 2023
27 min
Simplifying Server Components
Top Content
React server components simplify server-side rendering and provide a mental model of components as pure functions. Using React as a library for server components allows for building a basic RSC server and connecting it to an SSR server. RSC responses are serialized virtual DOM that offload code from the client and handle interactivity. The client manifest maps serialized placeholders to real components on the client, enabling dynamic rendering. Server components combine the best of classic web development and progressive enhancement, offering the advantage of moving logic from the client to the server.
Exploring React Server Component Fundamentals
React Day Berlin 2023React Day Berlin 2023
21 min
Exploring React Server Component Fundamentals
Top Content
This Talk introduces React Server Components (RSC) and explores their serialization process. It compares RSC to traditional server-side rendering (SSR) and explains how RSC handles promises and integrates client components. The Talk also discusses the RSC manifest and deserialization process. The speaker then introduces the Waku framework, which supports bundling, server, routing, and SSR. The future plans for Waku include integration with client state management libraries.
And Now You Understand React Server Components
React Summit 2024React Summit 2024
27 min
And Now You Understand React Server Components
Top Content
In this Talk, Kent C. Dodds introduces React Server Components (RSCs) and demonstrates how to build them from scratch. He explains the process of integrating RSCs with the UI, switching to RSC and streaming for improved performance, and the benefits of using RSCs with async components. Dodds also discusses enhancements with streaming and server context, client support and loaders, server component rendering and module resolution, handling UI updates and rendering, handling back buttons and caching, and concludes with further resources for diving deeper into the topic.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Server Components: The Epic Tale of Rendering UX
React Summit 2023React Summit 2023
26 min
Server Components: The Epic Tale of Rendering UX
Top Content
This Talk introduces server components in React, which provide an intermediate format for rendering and offer advantages for both client-side and server-side rendering. Server components reduce bundle size on the client and improve search engine optimization. They abstract the rendering process, allowing for faster rendering and flexibility in choosing where to render components. While server components are still in the experimental stage, Next.js is a good starting point to try them out.
RSCs In Production: 1 Year Later
React Summit 2024React Summit 2024
24 min
RSCs In Production: 1 Year Later
Top Content
This Talk explores the experience of shipping server components in production and highlights the benefits and challenges of using Server Components in Next.js apps. The Talk discusses the deployment of UploadThing and the use of AppRouter for safe production usage. It delves into the implementation of different layouts, data fetching, and code centralization for improved performance. The Talk also covers the use of server components for performance optimization and latency handling. Additionally, it explores the use of Edge and Lambda for partial pre-rendering and the challenges faced with webpack performance and hydration. Overall, the Talk emphasizes the benefits and challenges of working with Server Components in Next.js applications.

Workshops on related topic

Mastering React Server Components and Server Actions in React 19
React Summit US 2024React Summit US 2024
150 min
Mastering React Server Components and Server Actions in React 19
Featured Workshop
Maurice de Beijer
Maurice de Beijer
Calling all React developers! Join us for an immersive 4-hour workshop diving deep into React Server Components and Server Actions. Discover how these game-changing technologies are revolutionizing web development and learn how to harness their full potential to build lightning-fast, efficient applications.

Explore the world of React Server Components, seamlessly blending server-side rendering with client-side interactivity for unmatched performance and user experience. Dive into React Server Actions to see how they combine client-side interactivity with server-side logic, making it easier to develop interactive applications without traditional API constraints.

Get hands-on experience with practical exercises, real-world examples, and expert guidance on implementing these technologies into your projects. Learn essential topics such as the differences between Server and Client Components, optimizing data fetching, passing data effectively, and maximizing performance with new React hooks like useActionState, useFormStatus and useOptimistic.

Whether you're new to React or a seasoned pro, this workshop will equip you with the knowledge and tools to elevate your web development skills. Stay ahead of the curve and master the cutting-edge technology of React 19. Don't miss out - sign up now and unleash the full power of React!
Exploring Server Side Rendering
React Advanced 2025React Advanced 2025
179 min
Exploring Server Side Rendering
Featured Workshop
Krasimir Tsonev
Krasimir Tsonev
Server-side rendering (SSR) is back in the spotlight – and React is evolving fast. In this workshop, we’ll go deep into the mechanics, performance trade-offs, and modern techniques of SSR with React.js. You'll start by building an SSR app from scratch – no frameworks, just raw renderToString and hydrateRoot—to truly understand how React renders on the server and hydrates on the client. From there, we'll upgrade to React 18’s streaming capabilities using renderToPipeableStream, implement selective hydration using Suspense, and integrate data fetching directly into the server render cycle. We’ll look at React Server Components (RSC), showing how they complement SSR. We'll also cover hydration strategies, how to prevent mismatches, and how to cache or stream HTML effectively for real-world performance. Finally, we’ll bridge our manual SSR work into production frameworks like Next.js.
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
Workshop
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
The Gateway to Backend: A Frontend Developer's Guide to Full-Stack Development
React Summit US 2023React Summit US 2023
160 min
The Gateway to Backend: A Frontend Developer's Guide to Full-Stack Development
Top Content
WorkshopFree
Amy Dutton
Amy Dutton
This workshop will guide you through the product development life cycle of creating a real-world web application. You will learn about React Server Components, building a design system within Storybook, and using frontend development to approach becoming a full-stack developer. The workshop will cover increasing confidence in your application with unit tests and implementing authentication and authorization. You'll have the opportunity to work through product features and examine a real-world RedwoodJS project, gaining valuable experience in real-world product development. RedwoodJS makes it simple to approach full-stack development, and this workshop will give you the skills you need to create your own real-world web applications.
Advanced Application Deployment Patterns with React Server Components (feat. a DIY RSC Framework)
React Summit US 2023React Summit US 2023
104 min
Advanced Application Deployment Patterns with React Server Components (feat. a DIY RSC Framework)
Top Content
Workshop
 Greg Brimble
Greg Brimble
The developer ecosystem is always moving fast and this year has proved no exception. React Server Components can offer a significant improvement to developer experience and to application performance. But I think it's fair to say that this new server-first paradigm can be tricky to wrap your head around!In the first half of this workshop, we'll explore React Server Components from the ground-up: building our own mini meta-framework to help us understand how RSCs work. We'll discover exactly what is produced by an RSC build and we'll connect those pieces together to form a full application.Next, we'll deploy it! Cloudflare have also had a busy year too — Smart Placement, in particular, is a new technology that we've developed which fits the RSC model perfectly. We'll explore why that makes sense for our workshop app, and we'll actually deploy it onto the Cloudflare Developer Platform.Finally, we'll build out our app a little further, using D1 (our serverless SQL database) to really show off the React Server Component's power when combined with Smart Placement.You should come away from this workshop with a greater understanding of how React Server Components work (both behind-the-scenes and also how you as a developer can use them day-to-day), as well as insight into some of the new deployment patterns that are now possible after recent innovations in the platform space.
Building Reusable Server Components in NextJS
React Summit US 2023React Summit US 2023
88 min
Building Reusable Server Components in NextJS
Top Content
Workshop
Will Bishop
Mettin Parzinski
2 authors
React continues to evolve their beta capability, React Server Components, and they're continuing to further develop them in partnership with frameworks like NextJS.In this workshop, attendees will learn what React Server Components are, how to effectively build and use them in NextJS, and focus on one of the major advantages of React/NextJS: reusability through components.We will also cover related beta technologies enabled by the `app` directory, such as nested layouts and server actions (alpha/experimental capability).Join us for this hands-on, 120 minute workshop!Technologies:
React, JavaScript/Typescript, NextJS, Miro