elixir-error-tracker / error-tracker

🐛 An Elixir-based built-in error reporting and tracking solution
https://hex.pm/packages/error_tracker
Apache License 2.0
383 stars 17 forks source link

Delete errors #67

Closed pmareke closed 2 months ago

pmareke commented 2 months ago

This PR adds the possibility to delete a given error and emmits an event when the error is deleted.

Delete in the Dashboard view

image

Delete in the show view:

image
crbelaus commented 2 months ago

I've been reflecting on this for some time and, while the implementation of this PR is not bad, I think it is not solving the right problem in the right way.

The problem that we want to solve is twofold. On the one hand we want to remove old errors so they don't show in the dashboard or take space in the database. On the other hand we want to avoid recording errors based on some client-provided criteria.

Removing an error is not particularly useful as new occurrences will create that same error again. Furthermore, depending on the number of occurrences that the error has, the Repo.delete operation may take a long time due to cascade deletions.

We are working on an error pruner that will remove old, resolved errors safely. But that requires careful consideration and measurement of query plans both in Postgres and SQLite.

So, thanks again for this work, but this is not a desirable feature at the moment.