How to Getting Started with Sentry Error Tracking

2021/4/12 min read
bookmark this

This blog shows how to get started with for tracking JavaScript errors and performance. 

Often once you ship your website, you'll continue to add content and features, which means you'll need to call more APIs to get more data, then your site will become slower, so you'll add some Cache to make the request faster and tracking the speed of your page so you'll know if you have improved or not. 

Now, this blog will try to show how to get started to use with JavaScript at Web Application, however, supports the following features.

  • Open-source error tracking system support PHP, Node.js, Python, Ruby, C#, Java, Go, React, Angular, Vue, JavaScript.
  • The pricing can start as free with limited features and can upgrade to the paid version with more.

Go to to register

First, go to to create an account, follow the instruction to prepare the JavaScript SDK. The application used in this sample was using Node.js in the backend, the frontend has a typescript file global.ts, and we want to add to the UI's JavaScript code. 

import * as Sentry from "@sentry/browser";
import { Integrations } from "@sentry/tracing";

    integrations: [new Integrations.BrowserTracing()],
    environment: 'local', // default is 'Production'
    // Set tracesSampleRate to 1.0 to capture 100%
    // of transactions for performance monitoring.
    // We recommend adjusting this value in production
    tracesSampleRate: 1.0,

Run the Page

Once you run the page which has the code, you should start seeing some data at the account. You can modify the environment as above to set to different environments of the data. 

That's all

Pretty much that's all to get started for setting up the environment for the, there're lots to setting you can do but this is minimal change you need to get started.