Sentry (Debug In Prod)

Add the sdk and it will automatically capture any fatal errors

As of May 2020, must wait about an hour after project is created to use

Javascript

All javascript libs have the same API:

@sentry/electron | @sentry/browser | @sentry/node

import * as Sentry from "@sentry/browser";

if(process.env.NODE_ENV === "production") {
  Sentry.init({dsn: "https://[hi]@sentry.io/2590109"});
}

If Sentry.init isn't called, all other Sentry functions are noops

Manually Logging

import * as Sentry from "@sentry/electron";

try {
    aFunctionThatMightFail();
} catch (err) {
    Sentry.captureException(err);
}

Sentry.captureMessage('Something went wrong');

Adding Context in General

Can add id, username, email, or ip_address

Don't add extra objects of arbitary size as they will be rejected if over 100KB

Adding Context for a Message

Creating Error Popup

Server-Side

Elixir

Usage

Node Specific

To capture all errors instead of just over 500

Last updated