Observability Matters: Enhancing Performance of our Node Application with OpenTelemetry

Rate this content
Bookmark

Have you ever considered that when we encounter terms like observability and reliability, our initial instinct is usually to attribute them solely to SRE concerns? Yet, upon closer examination, one may realize that actually implementing observability is, in essence, more aligned with the domain of developers. After all, developers are the ones who directly implement the actual logic into our existing codebase, and who better to understand and debug their code than the developers themselves? Through this session, we will emphasize on understanding the importance of observability specifically from a developer's perspective. Let's explore some best practices that help us effectively debug the performance of our Node application and how the inclusion of open source frameworks like OpenTelemetry could be beneficial to us.

This talk has been presented at Node Congress 2024, check out the latest edition of this JavaScript Conference.

FAQ

Yash Rajavarma is a computing researcher at the University of Calgary who specializes in distributed systems and has a passion for observability.

OpenTelemetry is a framework designed to create and manage telemetry data, including traces, metrics, and logs in a vendor-agnostic and tool-agnostic way.

Observability is crucial for developers because it enables them to understand the internal state of a system by examining its output, which helps in efficiently debugging performance issues and identifying potential bottlenecks.

The key components of an observability workflow are instrumentation, receiver, processor, and exporter. Instrumentation involves making code changes to emit telemetry data, the receiver captures this data, the processor filters or modifies it, and the exporter sends it to the observability backend.

Instrumentation is the process of making code changes within the source code so that the application can emit telemetry data.

OpenTelemetry solves the problem of having to re-instrument an entire codebase when switching observability tools, as it provides a vendor-agnostic and tool-agnostic way to manage telemetry data.

A beginner can get started with OpenTelemetry in Node.js by using auto instrumentation, which requires almost no code changes. Following the provided steps and referring to the official documentation can help in the setup.

OpenTelemetry can handle traces, metrics, and logs.

OpenTelemetry provides automatic instrumentation, which requires almost no code changes, and manual instrumentation, which allows specific parts of the application to emit telemetry data.

This phrase highlights that as systems become more distributed, managing them becomes more complex, making observability vital for ensuring they function correctly and efficiently.

Yash Verma
Yash Verma
7 min
04 Apr, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Yash Rajavarma introduces observability and explains its importance for developers. He discusses how OpenTelemetry can empower Node.js applications by providing easy instrumentation and management of telemetry data. OpenTelemetry simplifies the implementation of observability and is designed to benefit developers.

1. Introduction to Observability and OpenTelemetry

Short description:

In this part, Yash Rajavarma introduces himself and his passion for observability. He explains the importance of observability for developers and how OpenTelemetry can empower a Node.js application. OpenTelemetry is a framework that allows for easy instrumentation and management of telemetry data, including traces, metrics, and logs. It provides automatic instrumentation and supports various formats for exporting data. OpenTelemetry simplifies the process of implementing observability and is designed to benefit developers.

Hi everyone, I'm Yash Rajavarma. I work as a computing researcher at the University of Calgary, where I mostly work with distributed systems and I'm very much passionate about the field of observability.

In the past couple of months, I have been involved in a project called OpenTelemetry, and in this talk, I will be talking about Node.js and OpenTelemetry. So let's get started.

In this talk, we will be answering two questions. The first one is why observability matters for a developer and how we can empower a node application with OpenTelemetry?

To answer the first question, we'll have to look back in time and understand that as our systems evolve, they become more distributed. This can be seen in modern-day applications, like an e-commerce application, where a single microservice interacts with multiple microservices within the application. Issues such as microservices not working or high latency can greatly impact the user experience. This is where observability comes in. It allows us to understand the internal state of our system by examining its output, including logs, metrics, and traces. With observability, we can efficiently debug performance issues by identifying potential bottlenecks.

However, implementing observability can be complex. The first step is instrumentation, where code changes are made to emit telemetry data. This step specifically aligns with the developer's domain. But each observability tool has its own set of rules, making it challenging if we decide to switch tools in the future. OpenTelemetry solves this problem. It's a framework that creates and manages telemetry data in a vendor-agnostic and tool-agnostic way. It provides automatic instrumentation with minimal code changes and also allows for manual instrumentation when needed. OpenTelemetry uses a collector to receive, process, and export data to various ends, supporting multiple formats like Jager and Prometheus.

Getting started with OpenTelemetry Node.js is simple, especially with the auto-instrumentation feature. OpenTelemetry is designed not just for software, but for the people, for developers like us.

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.
Domain Driven Design with Vue Applications
Vue.js London 2023Vue.js London 2023
14 min
Domain Driven Design with Vue Applications
Top Content
Welcome to this talk on domain-driven design in Vue.js application. Today we are going to look into domain-driven design, its benefits and how it works with Vue.js domain-driven design versus the MVVM model. Vue.js thrives in domain-driven design, a design approach that models software to match a domain. DDD emphasizes understanding business logic and creating a domain that reflects the language and concepts. Integrating DDD in Vue.js offers benefits such as effective modeling of complex business domains, structured code reflecting domain logic, and easier onboarding and ownership.
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.
How to Share Code between React Web App and React Native Mobile App in Monorepo
React Summit 2022React Summit 2022
7 min
How to Share Code between React Web App and React Native Mobile App in Monorepo
This presentation focuses on sharing code between React web and React native mobile apps. The speaker demonstrates how to achieve feature parity using a Monorepo with NX. They highlight the importance of sharing non-UI code, such as business logic and state management, through shared libraries. This approach allows the apps to focus on UI code while keeping non-UI code separate. For more details, refer to the speaker's blog post.

Workshops on related topic

Beyond the Framework: Distributing Your Desktop App Like a Pro
JSNation 2023JSNation 2023
109 min
Beyond the Framework: Distributing Your Desktop App Like a Pro
WorkshopFree
Jonas Kruckenberg
Jonas Kruckenberg
Building apps using web technology is great; however, at times you may encounter limitations regardless of what framework you choose. During this workshop, we will talk about choosing a framework, common problems and how to overcome them.
Table of contents- Introduction: The intertwined history of the Web and Apps- So many desktop app technologies! How do I choose one?- Common issues and how to think about apps- Conclusion
Web Accessibility in JavaScript Apps
React Summit 2022React Summit 2022
161 min
Web Accessibility in JavaScript Apps
Workshop
Sandrina Pereira
Sandrina Pereira
Often we see JavaScript damaging the accessibility of a website. In this workshop, you’ll learn how to avoid common mistakes and how to use JS in your favor to actually enhance the accessibility of your web apps!
In this workshop we’ll explore multiple real-world examples with accessibility no-nos, and you'll learn how to make them work for people using a mouse or a keyboard. You’ll also learn how screen readers are used, and I'll show you that there's no reason to be afraid of using one!
Join me and let me show you how accessibility doesn't limit your solutions or skills. On the contrary, it will make them more inclusive!
By the end, you will:- Understand WCAG principles and how they're organized- Know common cases where JavaScript is essential to accessibility- Create inclusive links, buttons and toggleble elements- Use live regions for errors and loading states- Integrate accessibility into your team workflow right away- Realize that creating accessible websites isn’t as hard as it sounds ;)
Build a Universal Reactive Data Library with Starbeam
JSNation 2023JSNation 2023
66 min
Build a Universal Reactive Data Library with Starbeam
WorkshopFree
Yehuda Katz
Yehuda Katz
This session will focus on Starbeam's universal building blocks. We'll use Starbeam to build a data library that works in multiple frameworks.We'll write a library that caches and updates data, and supports relationships, sorting and filtering.Rather than fetching data directly, it will work with asynchronously fetched data, including data fetched after initial render. Data fetched and updated through web sockets will also work well.All of these features will be reactive, of course.Imagine you filter your data by its title, and then you update the title of a record to match the filter: any output relying on the filtered data will update to reflect the updated filter.In 90 minutes, you'll build an awesome reactive data library and learn a powerful new tool for building reactive systems. The best part: the library works in any framework, even though you don't think about (or depend on) any framework when you built it.
Table of contents- Storing a Fetched Record in a Cell- Storing multiple records in a reactive Map- Reactive iteration is normal iteration- Reactive filtering is normal filtering- Fetching more records and updating the Map- Reactive sorting is normal sorting (is this getting a bit repetitive?)- Modelling cache invalidation as data- Bonus: reactive relationships
Build Web3 apps with React
React Summit 2022React Summit 2022
51 min
Build Web3 apps with React
WorkshopFree
Shain Dholakiya
Shain Dholakiya
The workshop is designed to help Web2 developers start building for Web3 using the Hyperverse. The Hyperverse is an open marketplace of community-built, audited, easy to discover smart modules. Our goal - to make it easy for React developers to build Web3 apps without writing a single line of smart contract code. Think “npm for smart contracts.”
Learn more about the Hyperverse here.
We will go over all the blockchain/crypto basics you need to know to start building on the Hyperverse, so you do not need to have any previous knowledge about the Web3 space. You just need to have React experience.