amarandon

amarandon

How to monitor errors?

Coming from a non-BEAM language, I’m used to configure production services to send an alert message every time an exception occur on the server. I found that with beam’s fault-tolerance, this approach no longer works because Elixir errors aren’t necessary as bad: a process dies, its supervisor restarts it and the app keeps running fine. Getting an alert for each error raises a lot of false positives. Most of the time when we get an error alert, we check the app and it’s still behaving as it should. Yet, it’s still interesting to get information about these errors as it gives valuable feedback about how our app behaves. I’m thinking of turning off these alert messages while still logging errors and instead setup custom health checks based on expected observable behavior of our app. I’m wondering if some of you might have gone through a similar path when migrating to Elixir and what is your approach to monitoring the health of your app.

Most Liked

dimitarvp

dimitarvp

You can start with Sentry which has a good Elixir package. There’s also NewRelic, HoneyBadger, and others.

LostKobrakai

LostKobrakai

In AppSignal you can adjust how/when you’re getting notified about reoccurring errors. I guess similar methods might exist in other tools as well. So you don’t loose information, but you can adjust how they’re treated.

hauleth

hauleth

Second to @dimitarvp answer, but if you want to know how it is implemented on the “low level” then it is simple:

Just attach to :logger and handle messages for level :error and higher. As there are structured logs, then you can easily detect which one are caused by exceptions.

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New

Other popular topics Top

New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement