Send custom Alert like Error based on IF STATEMENT

if(condition ){

// send an alert to Sentry like when an error/exception occurs Sentry/Raven auto sends the Alert
// I want to send same kinda alert with a custom message like “My Logic passed”

}

Did you figure it out?

You won’t be able to customize alert messages. All alerts are based on events, and thus are given messages related to those events.

I actually got it working using the Ruby gem with Exception.new(“Message
goes here”)

Andrew CP Kelley | CEO of CallRed http://www.callred.com/

HI @zeeg
If I can send just a plain Event with a Message like @ACPK did , will be okay for me.

BTW I am using JavaScript in Browser.

So Exception.new(“Message goes here”) will be changed to JS Raven API ? what will be that ?

Thanks

Theres no guarantees on what the alert will be titled, but today we use the error class + message.

@zeeg , for Title , its okay.

So what is the JS code for sending Alert ? @ACPK made this for Ruby.

Can also use something like:

Raven.capture_exception(“Message goes here”)

Andrew CP Kelley | CEO of CallRed http://www.callred.com/

Please see the docs for SDK usage:

https://docs.sentry.io/clients/