Tracking errors and slowdowns across JS applications using Sentry

Rate this content
Bookmark

We'll go through setting up Sentry step--step to get visibility into our frontend and backend. Once integrated, we will track and triage errors + transactions surfaced Sentry from our services to understand why/where/how errors and slowdowns occurred within our application code.

Simon Zhong
Simon Zhong
59 min
29 Mar, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Workshop on Sentry and Application Monitoring covers topics such as tracking errors and slowdowns in JS applications, integrating Sentry into React and Express, setting up alerts and notifications, analyzing error details and performance, and using dashboards and the sandbox. It also highlights the importance of code observability, the use of source maps for deciphering minified code, and the ability to trace errors from front end to back end. Additionally, it mentions the features of performance monitoring, such as analyzing transactions and using web vitals. Data scrubbing tools and GDPR compliance are also emphasized.

1. Introduction to Sentry and Application Monitoring

Short description:

Hello, everybody. My name is Simon. I'm a solutions engineer at Sentry. Today, I'll be discussing tracking errors and slowdowns across JS applications using Sentry. We'll cover application monitoring, Sentry integration steps, error and performance monitoring, alerts, and data organization through Discover and Dashboards. Let's get started!

♪♪ All right. I'll go ahead and get started. Hello, everybody. My name is Simon. I'm a solutions engineer at Sentry. I'll just start sharing my screen here. Let's make sure... Share. My desktop. All right. So everybody should see my desktop. Got a slide deck prepared for us and we can go through kind of this topic that we're all joined here for is tracking errors and slowdowns across JS applications using Sentry.

So by way of introduction, my name is Simon Zhang. I'm a solutions engineer at Sentry. And I've got a few slides for us to go through kind of end-to-end process of getting us situated with Sentry, the SDK on our application and also how we can go into Sentry to, you know, track the errors, track the slowdowns, notify necessary people, work through the workflow that we supply through Sentry, optimize the user and developer experience all with our platform here. Just to continue on through this agenda to keep us organized today, I'll start off with describing application monitoring, what Sentry is designed for and how and why it's important. Then go into the weeds a bit with the Sentry integration steps. So that includes getting the SDK on our apps. I've got a couple apps for us to do this with, so a React front-end and a Node Express back-end. So, both JavaScript apps and we'll get a project created in Sentry and also integrate these applications with those Sentry projects. So, Sentry project and application, those are like mapped one-to-one. We'll go into the details there but, number three, errors and performance. So, we'll talk about error monitoring and performance monitoring. Step four, or chapter four for us, will be going through alerts. So, notifying the right people off of the errors and performance, you know, data that we capture. We organize the data by releases. So, we'll talk about that as well and go over Discover and Dashboard, how we organize and slice and dice data that we care about in our team and our organization or just to look at our data for fun. Whatever we wanna do with the data we capture, we can do it through Discover and Dashboards.

Now, with the meeting that we have together, this is on Zoom, right? And we have, it looks like our Q&A feature might be a little wonky today. So, we'll try to sort that out.

2. Introduction to Application Monitoring and Sentry

Short description:

Let's start with a problematic application that crashes periodically, takes a long time to load products, and encounters errors during checkout. Without Sentry, it's challenging to identify and fix these issues efficiently. That's why we need application monitoring. Sentry focuses on code observability, monitoring the health of an application from front end to back end. With the Sentry SDK, we can set up targeted alerts and capture all the necessary details to understand the context and user experience. By incorporating Sentry into our application, we can identify and fix problems effectively.

Feel free to unmute when, you know, I pause for questions and I'll also pause midway and by the end of the session, I'll do a quick break for questions as well or feel free to just type it in chat and I can get to that when, throughout the meeting as well.

So, with that, let's start with the first bit here. So, what is application monitoring and why? So, let's start off first with reviewing a problematic application. This will kind of give a more hands-on example of what we're looking for. So, I've got this application that crashes periodically. So, I'm just going to refresh it a bit and it crashed. Okay, what the heck happened? So, this is one thing we need to worry about for this problematic application. Sometimes it crashes, sometimes it doesn't on a refresh, on load. Another problem with this application is when I go into looking at these products, it's an eCommerce site, I'm looking and trying to buy stuff as an end-user, right? I've got my end-user hat on, took a long time for me to see the products that I want to buy, and lastly, when I try to check out and buy the products that I've added to my cart, we encounter an error. So, we've got three problems with this application and as an end-user, I'm frustrated, confused, I don't know what's going on. Maybe I'll click this to reach out to the developers or whoever's in charge to, you know, notify them of these problems, but it's just not a cohesive way to do it. And as an end-user, I might just, you know, try again later or just give up on buying these things in my cart. So that's without Sentry and something that we need to figure out. So that's the problem situation, what we're trying to fix together.

Now without Sentry, maybe we'll get notified of this problem that we're experiencing, try to reproduce it as we, you know, enter the problem through that page load. Oh, I can't reproduce it, what's going on? Or I eventually do reproduce it and I look at my console to investigate what's the problem, maybe check out the network tab as we reproduce the problem as well. There are opportunities here to figure out that problem we experienced by the end user, but it's not as streamlined and efficient as we'd like, not as trackable either. So that is why we care about application monitoring. We want, as the developers, we want to know the problems in our code and the user experience with the code we write. So that's why we've got Sentry, right? So Sentry is focused on code observability. We monitor the health of an application from the front end to the back end. And with the Sentry SDK on your application, the concept is to set up alerts. And these are like targeted alerts that aren't noisy and not spamming our team members. So we'll set up very specific and granular alerts with our alert platform, those necessary or the important team members and developers would be notified and they can work through the issue. All the details that are captured by Sentry are all available for them to understand the context, what the user experience as well, any clues on which problems might be related and also what parts of the code are important, things like that, contextual information through a timeline of activity and tags will talk about as well. At the end of the day, we'll figure out what's going on, make the necessary commits and then fix the problem, right? That's the way we would incorporate Sentry in our application.

Now to follow along, what we have is a demo app. So that's what this URL is for, but if you want it to, and that's what we'll be reviewing together. So I've got one running locally and I've also got one that's hosted. So we'll go through both and tinker a bit with the one that I've got running locally.

Watch more workshops on topic

Deploying React Native Apps in the Cloud
React Summit 2023React Summit 2023
88 min
Deploying React Native Apps in the Cloud
WorkshopFree
Cecelia Martinez
Cecelia Martinez
Deploying React Native apps manually on a local machine can be complex. The differences between Android and iOS require developers to use specific tools and processes for each platform, including hardware requirements for iOS. Manual deployments also make it difficult to manage signing credentials, environment configurations, track releases, and to collaborate as a team.
Appflow is the cloud mobile DevOps platform built by Ionic. Using a service like Appflow to build React Native apps not only provides access to powerful computing resources, it can simplify the deployment process by providing a centralized environment for managing and distributing your app to multiple platforms. This can save time and resources, enable collaboration, as well as improve the overall reliability and scalability of an app.
In this workshop, you’ll deploy a React Native application for delivery to Android and iOS test devices using Appflow. You’ll also learn the steps for publishing to Google Play and Apple App Stores. No previous experience with deploying native applications is required, and you’ll come away with a deeper understanding of the mobile deployment process and best practices for how to use a cloud mobile DevOps platform to ship quickly at scale.
MERN Stack Application Deployment in Kubernetes
DevOps.js Conf 2022DevOps.js Conf 2022
152 min
MERN Stack Application Deployment in Kubernetes
Workshop
Joel Lord
Joel Lord
Deploying and managing JavaScript applications in Kubernetes can get tricky. Especially when a database also has to be part of the deployment. MongoDB Atlas has made developers' lives much easier, however, how do you take a SaaS product and integrate it with your existing Kubernetes cluster? This is where the MongoDB Atlas Operator comes into play. In this workshop, the attendees will learn about how to create a MERN (MongoDB, Express, React, Node.js) application locally, and how to deploy everything into a Kubernetes cluster with the Atlas Operator.
Azure Static Web Apps (SWA) with Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
13 min
Azure Static Web Apps (SWA) with Azure DevOps
WorkshopFree
Juarez Barbosa Junior
Juarez Barbosa Junior
Azure Static Web Apps were launched earlier in 2021, and out of the box, they could integrate your existing repository and deploy your Static Web App from Azure DevOps. This workshop demonstrates how to publish an Azure Static Web App with Azure DevOps.
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
163 min
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
Workshop
Alex Korzhikov
Andrew Reddikh
2 authors
The workshop gives a practical perspective of key principles needed to develop, build, and maintain a set of microservices in the Node.js stack. It covers specifics of creating isolated TypeScript services using the monorepo approach with lerna and yarn workspaces. The workshop includes an overview and a live exercise to create cloud environment with Pulumi framework and Azure services. The sessions fits the best developers who want to learn and practice build and deploy techniques using Azure stack and Pulumi for Node.js.

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

Levelling up Monorepos with npm Workspaces
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Levelling up Monorepos with npm Workspaces
Top Content
Learn more about how to leverage the default features of npm workspaces to help you manage your monorepo project while also checking out some of the new npm cli features.
Automating All the Code & Testing Things with GitHub Actions
React Advanced Conference 2021React Advanced Conference 2021
19 min
Automating All the Code & Testing Things with GitHub Actions
Top Content
Code tasks like linting and testing are critical pieces of a developer’s workflow that help keep us sane like preventing syntax or style issues and hardening our core business logic. We’ll talk about how we can use GitHub Actions to automate these tasks and help keep our projects running smoothly.
Fine-tuning DevOps for People over Perfection
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Fine-tuning DevOps for People over Perfection
Top Content
Demand for DevOps has increased in recent years as more organizations adopt cloud native technologies. Complexity has also increased and a "zero to hero" mentality leaves many people chasing perfection and FOMO. This session focusses instead on why maybe we shouldn't adopt a technology practice and how sometimes teams can achieve the same results prioritizing people over ops automation & controls. Let's look at amounts of and fine-tuning everything as code, pull requests, DevSecOps, Monitoring and more to prioritize developer well-being over optimization perfection. It can be a valid decision to deploy less and sleep better. And finally we'll examine how manual practice and discipline can be the key to superb products and experiences.
Why is CI so Damn Slow?
DevOps.js Conf 2022DevOps.js Conf 2022
27 min
Why is CI so Damn Slow?
We've all asked ourselves this while waiting an eternity for our CI job to finish. Slow CI not only wrecks developer productivity breaking our focus, it costs money in cloud computing fees, and wastes enormous amounts of electricity. Let’s take a dive into why this is the case and how we can solve it with better, faster tools.
The Zen of Yarn
DevOps.js Conf 2022DevOps.js Conf 2022
31 min
The Zen of Yarn
In the past years Yarn took a spot as one of the most common tools used to develop JavaScript projects, in no small part thanks to an opinionated set of guiding principles. But what are they? How do they apply to Yarn in practice? And just as important: how do they benefit you and your projects?
In this talk we won't dive into benchmarks or feature sets: instead, you'll learn how we approach Yarn’s development, how we explore new paths, how we keep our codebase healthy, and generally why we think Yarn will remain firmly set in our ecosystem for the years to come.
Atomic Deployment for JS Hipsters
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
Atomic Deployment for JS Hipsters
Deploying an app is all but an easy process. You will encounter a lot of glitches and pain points to solve to have it working properly. The worst is: that now that you can deploy your app in production, how can't you also deploy all branches in the project to get access to live previews? And be able to do a fast-revert on-demand?Fortunately, the classic DevOps toolkit has all you need to achieve it without compromising your mental health. By expertly mixing Git, Unix tools, and API calls, and orchestrating all of them with JavaScript, you'll master the secret of safe atomic deployments.No more need to rely on commercial services: become the perfect tool master and netlifize your app right at home!