Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I test that Sentry is reporting errors?

I just installed Sentry for a client-side JavaScript app using the standard code snippet they provided. How do I test that it's working properly? I've tried manually throwing an error from my browser console and it didn't appear in Sentry. Is there any documentation on the right way to do this?

like image 342
serverpunk Avatar asked Nov 16 '17 15:11

serverpunk


People also ask

How do I test a sentry error?

Go to your email and open the notification from Sentry. Click "View on Sentry" to view the full details and context of this error in your Sentry account. Note that Sentry aggregates similar errors (events) into one issue. In your account, scroll down to the "Exception" stack trace.

Does Sentry Report caught exceptions?

Sentry's SDK hooks into your runtime environment and automatically reports errors, uncaught exceptions, and unhandled rejections as well as other types of errors depending on the platform.

What is Sentry error?

What is Sentry? Sentry is Open-source error tracking that helps developers to monitor, fix crashes in real time. Don't forget about boosting the efficiency, improving user experience. Sentry has support for JavaScript, React, Node, Python, PHP, Ruby, Java and other programming languages.


1 Answers

Verify (newer)

myUndefinedFunction(); 

Verifying Your Setup (older)

Sentry.captureException(new Error("This is my fake error message")); 

https://docs.sentry.io/platforms/javascript/?platform=browser#verifying-your-setup

May be worth double-checking your setup (or updating) and config too.

like image 133
Leo Avatar answered Oct 05 '22 23:10

Leo