Observability for React Developers

Rate this content
Bookmark

Observability is the ability to measure the current state of a system. Backend engineers are becoming more familiar with the 3 pillars of observability, and technologies such as OpenTelemetry that can be used to instrument applications and diagnose issues. Yet in the frontend world, we're behind the curve.
Join me as I dive into the tools and techniques we can use to instrument, monitor and diagnose issues in our production React applications. I'll cover RUM agents and React framework extensions, and the metrics and traces they provide, how to combine them with backend tracing for a holistic picture, and how Synthetic Monitoring and alerting in Observability platforms can help us be alerted to issues impacting users in the UIs we build and maintain.

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

FAQ

Carly Richmond's talk focuses on observability for both front-end and back-end services in web applications, particularly for React applications.

The tools discussed include Rome agents, open telemetry, and synthetic monitoring.

The three types of telemetry information are logs, metrics, and traces.

Synthetic monitoring can be integrated into the CI pipeline by using tools like GitHub Actions to run monitors as code during development and deployment stages, ensuring they are in sync with application changes.

Playwright allows for end-to-end testing by automating user interactions and can be used to simulate user behavior on different devices, providing insights into application performance.

Logs, metrics, and traces help React developers by providing insights into application behavior, identifying bottlenecks, and diagnosing performance issues in both front-end and back-end services.

Code examples for RUM and synthetic monitoring can be found in the resources mentioned in Carly Richmond's talk.

A RUM (Real User Monitoring) agent is a tool used within JavaScript applications to collect metrics, diagnostic information, and tracing data to identify bottlenecks and performance issues in the front-end.

Open telemetry is recommended because it offers an open standard for telemetry data collection that is compatible with various vendor observability platforms, allowing for comprehensive front-to-back tracing.

Synthetic monitoring involves running scripts at fixed intervals to simulate user interactions or ping endpoints, helping catch issues before users encounter them. Tools like Playwright for JavaScript can be used for this purpose.

Carly Richmond
Carly Richmond
20 min
28 Oct, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
In this talk, observability in React web applications is discussed, covering Rome agents, open telemetry, and synthetic monitoring. The importance of logs, metrics, and traces in tracking application behavior and identifying issues is explained. The concept of a real user monitoring agent (rum agent) for JavaScript applications is introduced. Instrumenting the rum agent and React applications is explained, along with the caution to be mindful of the bundle size. Traces, open telemetry, and instrumentation are explored, including how Core Web Vitals, traces, and open telemetry can provide insights and enable auto-instrumentation. Synthetic monitoring using Playwright tests and the process of converting tests into monitors with configuration is covered. Finally, running and monitoring definitions in production is discussed, highlighting the ability to evaluate user behavior, simulate activities, and address issues proactively.
Video transcription and chapters available for users with access.

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

Multithreaded Logging with Pino
JSNation Live 2021JSNation Live 2021
19 min
Multithreaded Logging with Pino
Top Content
Today's Talk is about logging with Pino, one of the fastest loggers for Node.js. Pino's speed and performance are achieved by avoiding expensive logging and optimizing event loop processing. It offers advanced features like async mode and distributed logging. The use of Worker Threads and Threadstream allows for efficient data processing. Pino.Transport enables log processing in a worker thread with various options for log destinations. The Talk concludes with a demonstration of logging output and an invitation to reach out for job opportunities.
Observability for Microfrontends
DevOps.js Conf 2022DevOps.js Conf 2022
24 min
Observability for Microfrontends
Microfrontends follow the microservices paradigm and observability is crucial for debugging runtime production issues. Error boundaries and tracking errors help identify and resolve issues. Automation of alerts improves incident response. Observability can help minimize the time it takes to understand and resolve production issues. Catching errors from the client and implementing boundaries can be done with tools like OpenTelemetry.
Observability with diagnostics_channel and AsyncLocalStorage
Node Congress 2023Node Congress 2023
21 min
Observability with diagnostics_channel and AsyncLocalStorage
Observability with Diagnostics Channel and async local storage allows for high-performance event tracking and propagation of values through calls, callbacks, and promise continuations. Tracing involves five events and separate channels for each event, capturing errors and return values. The span object in async local storage stores data about the current execution and is reported to the tracer when the end is triggered.
How Grafana Uses React to Power the World of Observability
React Summit 2023React Summit 2023
7 min
How Grafana Uses React to Power the World of Observability
Watch video: How Grafana Uses React to Power the World of Observability
Grafana uses React to power its open source platform, leveraging its vast ecosystem, improved performance, and community contributions. The choice of state management tool depends on the team's problem space. React Hooks have posed challenges but have also been a powerful tool for developers. The new Scenes library simplifies development and reduces the learning curve. Despite challenges, React remains a powerful tool for complex frontends, and Grafana will continue to use it.
GraphQL Observability
GraphQL Galaxy 2020GraphQL Galaxy 2020
8 min
GraphQL Observability
This Talk discusses how to tool Apollo server with open tracing for observability. OpenTracing is a vendor-agnostic format that works well with distributed systems in microservices. It allows for converting GraphQL tracing data to a vendor-agnostic format and enriching information from GraphQL servers. If providers support OpenTracing, it can be easily integrated.
Creating an innovation engine with observability
Node Congress 2023Node Congress 2023
27 min
Creating an innovation engine with observability
Baseline provides observability for serverless architectures and has created an innovation engine within their team. They measure team performance using Dora metrics and the Accelerate book. Baseline emphasizes the importance of foundations, streamlined testing, and fast deployment. They practice observability-driven development and incorporate observability as part of their development lifecycle. Baseline believes in building a culture that fosters ownership and democratizes production.

Workshops on related topic

Scaling Databases For Global Serverless Applications
Node Congress 2022Node Congress 2022
83 min
Scaling Databases For Global Serverless Applications
WorkshopFree
Ben Hagan
Ben Hagan
This workshop discusses the challenges Enterprises are facing when scaling the data tier to support multi-region deployments and serverless environments. Serverless edge functions and lightweight container orchestration enables applications and business logic to be easily deployed globally, often leaving the database as the latency and scaling bottleneck.
Join us to understand how PolyScale.ai solves these scaling challenges intelligently caching database data at the edge, without sacrificing transactionality or consistency. Get hands on with PolyScale for implementation, query observability and global latency testing with edge functions.
Table of contents- Introduction to PolyScale.ai- Enterprise Data Gravity- Why data scaling is hard- Options for Scaling the data tier- Database Observability- Cache Management AI- Hands on with PolyScale.ai