Live Coding Workshop to Setup Rollbar Error Monitoring

Rate this content
Bookmark

During this session you will learn how to create a new Rollbar account and integrate the Rollbar SDK with your application to monitor errors in real-time and respond and fix those errors. We will also cover how to customize payload data sent to Rollbar to extend your monitoring capabilities.

Agenda:

- Create a Rollbar Account (Free Account)

- Integrate your application with the Rollbar SDK

- Send handled and unhandled errors to Rollbar

Add Custom payload data to your configuration.

This workshop has been presented at TypeScript Congress 2023, check out the latest edition of this JavaScript Conference.

FAQ

The live coding workshop aims to guide participants through setting up Rollbar using a Vue TypeScript application. It is designed for beginners and focuses on getting the application up and running with Rollbar integration.

The workshop provides three main resources: a GitHub repository named 'The Dev Factory' containing the Vue TS demo, a step-by-step PDF guide within the repository, and a link to Rollbar's promo page (rollbar.com/error-push-promo) to register for a Rollbar account with a $250 credit for one year.

The workshop covers the following main steps: creating a Vue TypeScript project, creating a Rollbar account using a provided promo link, integrating the application with Rollbar, sending handled and unhandled errors to Rollbar, and customizing the payload to include additional data.

To create a new Vue project, run the command `npm create vue-at-latest` in your terminal or command line. Follow the prompts to set up the project, choosing TypeScript and other desired options. Ensure you have the necessary read and write permissions for the directory.

If you encounter issues during the setup, ensure you have the necessary libraries installed and the required read and write permissions for your directory. You can also refer to the Discord channel for support or consult the step-by-step PDF guide provided in the GitHub repository.

Visit rollbar.com/error-push-promo to register for a Rollbar account. Ensure the page indicates a $250 credit at the top. Follow the prompts to create a new account or log in to an existing one. This credit is valid for one year and can be used for both free and paid Rollbar accounts.

Rollbar is an error monitoring platform used to track handled and unhandled exceptions in applications. In the workshop, Rollbar is integrated into a Vue TypeScript application to capture and log errors, providing real-time visibility into issues.

You can customize the data sent to Rollbar by modifying the `rollbar.config.js` file. This can include adding user information, session details, feature flags, or any other relevant data. The workshop provides examples of how to add custom data to the payload.

After successful setup, your application should display a button labeled 'trigger error'. Clicking this button will simulate an error and send it to Rollbar, allowing you to verify that the integration is working correctly.

The code examples and resources used in the workshop can be found in the GitHub repository named 'The Dev Factory'. This repository includes the Vue TS demo project and the step-by-step PDF guide for the workshop.

Nico Krüger
Nico Krüger
48 min
25 Sep, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Today's Workshop focused on setting up a Vue TypeScript project and integrating it with Rollbar for error monitoring. Participants learned how to modify code to be TypeScript compliant, connect Rollbar plugin and test components, and add additional data to the payload. The Workshop also covered customizing the payload, configuring Rollbar, and using the transform function to modify the payload. Overall, participants gained insights into handling errors, capturing telemetry data, and integrating Rollbar with other tools.

1. Introduction to the Workshop

Short description:

Thank you for joining the live coding workshop. I've added links to a GitHub repo with the Vue TS demo and a PDF with step-by-step instructions. We'll be setting up Rollbar in a Vue TypeScript application. Use the Rollbar registration link for a $250 credit to your account. Let's get started!

Thank you very much, and good day, everybody from wherever you're joining today. So this will be a live coding workshop. So I've added a couple of links for you today to follow. There's a GitHub repo, The Dev Factory, that's my GitHub. In there is the Vue TS demo, which is really what we're going to be ending up with. So that's the end product. But you can have that open to follow along. The second link is also in the repository. It is the PDF of the actual workshop, step by step, that we'll be running through. Now, this is really a beginner's step. It's more about setting up Rollbar, but we'll be using a Vue TypeScript application. So really beginner level, we just want to get the application up and running and get Rollbar installed as well. But feel free to use that PDF to go ahead and view the steps. The last link is at rollbar.com forward slash error push slash promo. When we get to the step to register your Rollbar account, please use that hyperlink. The reason for that is it does get you a $250 credit to your account for one year. So you can go ahead and use either Rollbar free account, or if you want to use a paid account, or even want to get this for your company, that gets you a nice little discount as well to get going on this product. So hopefully that helps get you started for the session.

2. Setting Up the Vue TypeScript Project

Short description:

Today, we'll be creating a view TypeScript project, setting up a Rollbar account, integrating the application with Rollbar, sending handled and unhandled errors, and customizing the payload and instrumentation. If you have the PDF open, you can go to the first step. Create a new Vue project using the command 'npm create vue-at-latest' and follow the prompts. Make sure you have read and write permissions for the project folder. If you encounter any issues, let me know.

Now, so what are we going to do today? So the first thing is we'll be running through a couple of steps. The step zero is we'll be creating a view TypeScript project. So that will be our first step. Then we'll be creating that Rollbar account with that hyperlink I gave you, the error push slash promo. Then we'll be integrating this application, so your application with Rollbar. Then we'll be sending a handled and unhandled error to Rollbar. And then at the end, we'll be looking at some ways to customize your payload and how you can instrument Rollbar in different ways for your application to get more relevant and more additional data into the system as well.

All right. So that will be what we'll be doing today. All right. So if you have the PDF open, I can put that to the side. For most of you, hopefully you're on a Mac or Windows machine, so it might be slightly different. I'm doing it on a Mac today. If you're doing it on a Windows machine, I do have a Windows machine next to me as well, so we can go ahead and run that as well. So if you do have a PDF open, you can go to the first step.

So what we're going to do first is we're going to go ahead and create a brand new Vue project. So for those of you it's npm create vue-at-latest. So if you start this command in your terminal window or command line on Windows, we'll go ahead and start the process to create our first project over here. Now what we'll get when we do this is we've got to give our project a name. Now, you can pick any name you really want. I'm going to go ahead and do the vue-ts-rollbar-demo. So a Vue TypeScript rollbar demo application. Next, do you want to do JavaScript or TypeScript? Now we're going to do TypeScript today, rollbar does work perfectly well with JavaScript. In fact, we're going to use the rollbar JavaScript SDK, in fact, to instrument this application. But again, for this example, today, we'll be using TypeScript. We're going to add JSX support as well. And yes, we want a single page application. Just say yes to all of these items. We won't be using all of them. But again, if you want to add some testing, you can as well. I'm just going to go ahead and do all of this. And you should end up with a screen like this.

Now what should have happened in the background over here, if we go to my computer, is we should have a brand new application created. If we go into my specific application over here, you see the Vue TS rollbar demo. Hopefully everybody has been able to go ahead and use that command line to go ahead and create that. And we'll just go up again. It is npm create vue at latest. I'm using the latest version of Vue over here. And of course, we're going to use Vite for TypeScript. So hopefully, you've got this up and running. Now, very important is the directory or folders we're working on, you need to read and write permission to them. So make sure you got your permissions all good there. I'm just going to go ahead and go into this specific folder right there. So there, we should have everything we want. Beautiful. All right. So if you're having a problem, let me know. But hopefully, everybody got over this one. This is pretty easy. The only thing that might be a problem is if you don't have some of the libraries installed.

Watch more workshops on topic

How to Solve Real-World Problems with Remix
Remix Conf Europe 2022Remix Conf Europe 2022
195 min
How to Solve Real-World Problems with Remix
Featured Workshop
Michael Carter
Michael Carter
- Errors? How to render and log your server and client errorsa - When to return errors vs throwb - Setup logging service like Sentry, LogRocket, and Bugsnag- Forms? How to validate and handle multi-page formsa - Use zod to validate form data in your actionb - Step through multi-page forms without losing data- Stuck? How to patch bugs or missing features in Remix so you can move ona - Use patch-package to quickly fix your Remix installb - Show tool for managing multiple patches and cherry-pick open PRs- Users? How to handle multi-tenant apps with Prismaa - Determine tenant by host or by userb - Multiple database or single database/multiple schemasc - Ensures tenant data always separate from others
Monitoring 101 for React Developers
React Advanced 2023React Advanced 2023
112 min
Monitoring 101 for React Developers
Top Content
WorkshopFree
Lazar Nikolov
Sarah Guthals
2 authors
If finding errors in your frontend project is like searching for a needle in a code haystack, then Sentry error monitoring can be your metal detector. Learn the basics of error monitoring with Sentry. Whether you are running a React, Angular, Vue, or just “vanilla” JavaScript, see how Sentry can help you find the who, what, when and where behind errors in your frontend project.
Build a powerful DataGrid in few hours with Ag Grid
React Summit US 2023React Summit US 2023
96 min
Build a powerful DataGrid in few hours with Ag Grid
Top Content
WorkshopFree
Mike Ryan
Mike Ryan
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
We all know that rolling our own grid solution is not easy, and let's be honest, is not something that we should be working on. We are focused on building a product and driving forward innovation. In this workshop, you'll see just how easy it is to get started with AG Grid.
Prerequisites: Basic React and JavaScript
Workshop level: Beginner
Build a Powerful Datagrid With AG Grid
React Summit 2024React Summit 2024
168 min
Build a Powerful Datagrid With AG Grid
Top Content
WorkshopFree
Brian Love
Brian Love
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
Get started with AG Grid Angular Data Grid
JSNation 2022JSNation 2022
116 min
Get started with AG Grid Angular Data Grid
WorkshopFree
Stephen Cooper
Stephen Cooper
Get started with AG Grid Angular Data Grid with a hands-on tutorial from the core team that will take you through the steps of creating your first grid, including how to configure the grid with simple properties and custom components. AG Grid community edition is completely free to use in commercial applications, so you’ll learn a powerful tool that you can immediately add to your projects. You’ll also discover how to load data into the grid and different ways to add custom rendering to the grid. By the end of the workshop, you will have created and customized an AG Grid Angular Data Grid.
Contents:- getting started and installing AG Grid- configuring sorting, filtering, pagination- loading data into the grid- the grid API- add your own components to the Grid for rendering and editing- capabilities of the free community edition of AG Grid

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

Safely Handling Dynamic Data with TypeScript
Node Congress 2021Node Congress 2021
29 min
Safely Handling Dynamic Data with TypeScript
Top Content
This Talk discusses the safe handling of dynamic data with TypeScript using JSON Schema and TypeBox. Fastify, a web framework, allows developers to validate incoming data using JSON schema, providing type safety and error handling. TypeBox is a powerful library that allows developers to define JSON schemas and derive static types in TypeScript. The combination of JSON schema, TypeBox, and Fastify provides powerful tools for type safety and validation of dynamic data.
Apache Kafka Simply Explained With TypeScript Examples
JSNation 2023JSNation 2023
27 min
Apache Kafka Simply Explained With TypeScript Examples
Top Content
Apache Kafka is a distributed, scalable, and high-throughput event streaming platform that plays a key role in event-driven architecture. It allows for the division of monolithic applications into independent microservices for scalability and maintainability. Producers and consumers are the key components in Kafka, allowing for a decoupled system. Kafka's replication and persistent storage capabilities set it apart from alternatives like Redis and RabbitMQ. Kafka provides easy access to real-time data and simplifies real-time data handling.
Mastering Error Handling Node.js
Node Congress 2022Node Congress 2022
21 min
Mastering Error Handling Node.js
Top Content
This Talk explores error handling in Node.js, including types of errors, handling techniques, and debugging. It discusses the use of exceptions, callbacks, and promises for error handling. The importance of proper error handling and the benefits of using error classes, expressive error messages, and automated testing are emphasized. The speaker also addresses the use of TypeScript and test-driven development for error prevention. Overall, the Talk provides valuable insights and techniques for mastering error handling in Node.js.
The Art of Functional Programming
React Summit 2022React Summit 2022
26 min
The Art of Functional Programming
Functional programming is a beautiful paradigm that allows us to understand programs and how entities behave and interact. It has nice characteristics like predictability, which makes testing and debugging easier. We explore how functional programming handles side effects and generative art. We learn about drawing patterns and grids with recursive functions, handling state in functional programming, and creating fashion using functional programming techniques. We also discuss handling randomness in functional programming and how to introduce organic variation and randomness to art while maintaining predictability.
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.
Track Slowdowns and Crashes in your React apps
React Advanced 2021React Advanced 2021
8 min
Track Slowdowns and Crashes in your React apps
Sentry is a tool for code observability that supports multiple languages and frameworks. It allows monitoring of errors and performance in applications, such as React apps in an ecommerce site. With Sentry, developers can easily investigate errors using developer tools and get a summary of the error. It also provides human-readable stack traces that highlight the exact line of the error.