[Errors] email on error?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Errors] email on error?

sergio_101
Is there  a way to send an email on an error or exception?

I have an app that runs live on a remote server, and I am finding that every now and then, the server will lock up, and I won’t know what’s going on with it.

Currently, i pull the image and run it local, but an email with a stack trace would be SUPER helpful.

Thanks!



----
peace,
sergio
photographer, journalist, visionary


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Errors] email on error?

Peter Uhnak
Hi Sergio,

I highly recommend using a more sophisticated solution such as Sentry ( https://github.com/peteruhnak/pharo-sentryhttps://peteruhnak.github.io/pharo-sentry/ ).

If you want something really simple, then ShoreLine can be of assistance (assuming you use Pharo 6; it was removed in P7)
You can enable automatic reporting in settings, and if you want to send email instead of a API request, then look at (and change) SlReporter>>send:

But I have to strongly discourage you from using simple stack traces in mail... it is a nightmare to manage; especially if you have multiple servers/versions/errors occur in a loop, etc.
(I've tried using SL for about 2 months, and I've failed miserably. That's why I wrote pharo-sentry).

Peter

On Fri, May 18, 2018 at 5:51 PM, sergio ruiz <[hidden email]> wrote:
Is there  a way to send an email on an error or exception?

I have an app that runs live on a remote server, and I am finding that every now and then, the server will lock up, and I won’t know what’s going on with it.

Currently, i pull the image and run it local, but an email with a stack trace would be SUPER helpful.

Thanks!



----
peace,
sergio
photographer, journalist, visionary


Reply | Threaded
Open this post in threaded view
|

Re: [Errors] email on error?

Tim Mackinnon
Rather than email you could possibly hook in something like datadog or Pingdom if you expose some metric - to get a timely alert.

Equally you could perhaps trap something in Pharo and write out a fuel file to an s3 bucket - with s3 you can then trigger an event and they have tools you can use to alert and or email (Ive not tried this - other than write to an s3 bucket - but I saw an AWS presentation on all there cloud tools and it looked straight forward) .

Tim

Sent from my iPhone

On 18 May 2018, at 18:33, Peter Uhnák <[hidden email]> wrote:

Hi Sergio,

I highly recommend using a more sophisticated solution such as Sentry ( https://github.com/peteruhnak/pharo-sentryhttps://peteruhnak.github.io/pharo-sentry/ ).

If you want something really simple, then ShoreLine can be of assistance (assuming you use Pharo 6; it was removed in P7)
You can enable automatic reporting in settings, and if you want to send email instead of a API request, then look at (and change) SlReporter>>send:

But I have to strongly discourage you from using simple stack traces in mail... it is a nightmare to manage; especially if you have multiple servers/versions/errors occur in a loop, etc.
(I've tried using SL for about 2 months, and I've failed miserably. That's why I wrote pharo-sentry).

Peter

On Fri, May 18, 2018 at 5:51 PM, sergio ruiz <[hidden email]> wrote:
Is there  a way to send an email on an error or exception?

I have an app that runs live on a remote server, and I am finding that every now and then, the server will lock up, and I won’t know what’s going on with it.

Currently, i pull the image and run it local, but an email with a stack trace would be SUPER helpful.

Thanks!



----
peace,
sergio
photographer, journalist, visionary


Reply | Threaded
Open this post in threaded view
|

Re: [Errors] email on error?

Peter Uhnak
On Fri, May 18, 2018 at 9:12 PM, Tim Mackinnon <[hidden email]> wrote:

Equally you could perhaps trap something in Pharo and write out a fuel file to an s3 bucket - with s3 you can then trigger an event and they have tools you can use to alert and or email

I do this too -- fuel is really simple to use, and S3 can be as simple as a single PUT request (unless you want some constraints like content type and size limiting).
I use combination of Sentry + S3: sentry contains the stack and bunch of other metadata, and I save fuel files to S3 named accordingly to the same sentry event... that way there's no mess in files.

For self-setup, you can copy how ShoreLine operates to see how to hook it up to Pharo (some other tips are here  http://forum.world.st/global-exception-handler-mechanism-td5065563.html#a5065731 , but I didn't yet have time to properly investigate them )

Peter