belaustegui

belaustegui

Announcing ErrorTracker, an Elixir-based built-in error tracking solution.

Features

  • Basic, free, built-in error tracking solution. Tracking errors in your application should be a requirement for almost any project and it helps to improve quality and maintenance.
  • Easy to set up. Includes plug-and-play integrations that work automatically such as:
    • Plug integration
    • Phoenix integration
    • Oban integration
  • Minimalistic. You just need a relational database to store errors. It can be your application’s database or a separate one.
  • Web UI. Includes a LiveView dashboard that allows you to search, manage and resolve recorded errors.
  • Extra context. Recorded errors include additional context such as the request path or the LiveView event for the Phoenix integration and the job ID and parameters for the Oban integration. You can also add your additional context.

What makes ErrorTracker different?

ErrorTracker does not require you to rely on third party services to track your errors. Your errors, just like your data, are yours. You decide where to store them, when to prune them and how to manage them.

This is invaluable for a whole set of applications that handle PII data and must maintain a high level of care when sharing that data with third parties. No need to worry whether the third party complies with HIPAA, GDPR, etc. as your data won’t leave your systems.

This is also highly beneficial for small projects that can’t afford to pay a third party service for tracking errors. Without this observability, errors are hard to debug and fix. The ErrorTracker allows you to track errors for free in your current system and may provide this observability capabilities that will help you reproduce and fix errors easily.

Useful links

https://github.com/elixir-error-tracker/error-tracker

Screenshots

Showing Posts 21 to 30

stevegrossi

stevegrossi

Thanks, will do. And I’m deploying as a release, not with mix.

belaustegui

belaustegui OP

We have just released v0.1.2 which solves this issue. Thanks for the detailed error reports and stacktraces.

odarriba

odarriba

Update on notifications!

We are working right now on adding Telemetry events (we love Telemetry, is the base of this project), so anyone can attach handlers to send notifications on their preferred way (email, slack, text messages, etc.).

It may not be as plug and play as many expect, but it is the most flexible way we could find without building a full notification system (which is complex), and it lets the developer to build their own rules and use their preferred notification channels.

It doesn’t mean that we will never build notifications in the library, just not now. But the options to be able to get notifications will arrive soon (hopefully next version)

ghannam80

ghannam80

hopefully it will be possible to integrate from the current UI where you select the error and decide to send this error to your notification channel “Could be a bug tracking system like github”

odarriba

odarriba

Version 0.2.0 is out!

This update includes several improvements to the library:

  • SQLite 3 compatibility (including a better way to track database schema versions)
  • Telemetry events - can be used to integrate your own notifications
  • UI improvements - more refined styles and UX
  • A better test suite, including testing in both RDBMS and different Elixir/Erlang versions in the CI

GitHub release
Hex.pm release

If you are already using the library: there is a new version of the DB schema, so you need to create a new migration to migrate to version 2.

We hope this version fixes some of the issues reported :slight_smile: any feedback is welcome!

Wojciech

Wojciech

Amazing work!

I’m trying to build a website and i don’t want to connect it to any external services so your project is really useful to me :slight_smile:

sevenseacat

sevenseacat

Author of Ash Framework

I’ve been using this and I really like it, it’s great :smiley:

A bit confused about needing to generate a new migration after updating to v0.2.0 though. I’ve already been running it in prod without doing so, and creating an ew migration with the same migration functions of:

def up, do: ErrorTracker.Migration.up()
def down, do: ErrorTracker.Migration.down()

Doesn’t make any changes to the schema when running them again after updating.

Additionally, having the same function ErrorTracker.Migration.down() in two diffirent migrations can’t be rolled back twice - the second raises an error because the tables were already dropped from the first down.

Do we need to put migration version numbers in the up/down calls, like Oban does I think when migrating between versions?

odarriba

odarriba

That makes sense, because V02 in PostgreSQL systems creates a new table to store meta information and moves the information about which migration version is the latest to that table.

Tables and structures used by ErrorTracker are not changed - we may use the new error_tracker_meta table in the future, but not now - so the system will work without that migration but it is really recommended to stay up to date.

As we migrated how the schema version number is stored - and it is an important information to take into account on the migration process - that migration is different to others, but we have tested it and should work as expected.

That’s the issue! We should have included that in the release message, but the idea is to have it like:

defmodule MyApp.Repo.Migrations.UpdateErrorTrackerToV02 do
  use Ecto.Migration

  def up, do: ErrorTracker.Migration.up(version: 2)
  def down, do: ErrorTracker.Migration.down(version: 2)
end

which produces this output when migrating:

15:42:49.730 [info] == Running 20240814134232 MyApp.Repo.Migrations.UpdateErrorTrackerToV02.up/0 forward

15:42:49.764 [info] create table if not exists public.error_tracker_meta

15:42:49.800 [info] execute "COMMENT ON TABLE \"public\".error_tracker_errors IS ''"

15:42:49.801 [info] execute "INSERT INTO public.error_tracker_meta (key, value)\nVALUES ('migration_version', '2'), ('migration_timestamp', '1723642969')\nON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value\n"

15:42:49.807 [info] == Migrated 20240814134232 in 0.0s

in the way you created it works fine if you go up, but on the down it will remove all migrations, so reverting the other one will result in errors because tables don’t exist anymore.

Yes!

Hope it helps!! If you have more issues please feel free to open an issue and we can find a solution there.

cgraham

cgraham

- user error on the bug.

Thanks for making this! I have had sentry on my to do list but will do this first. Just got it working and already it is reporting an error! Will have to remember to keep checking it :slight_smile:

Thanks again! So far so good!

jaimeiniesta

jaimeiniesta

Hey, this looks awesome and I’m willing to try it!

My only concern is whether this can be used in an app where I’m already using AppSignal or Sentry. Can you think of any incompatibilities?

Where Next? Top

Trending in Announcing Top

achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
danschultzer
I’ve moved the strategies out of PowAssent and created a multi-provider framework for Elixir. This way the strategies can be used in any ...
New
gtcode
Aloha gang, There’s a new class of AI model out from TypeSafe. Jev is their flagship model. You can learn about it here: ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
AstonJ
With advancements in AI gathering pace and set to increasingly accelerate, perhaps it’s worth having an annual thread on the topic - feel...
New
bartblast
If you haven’t tried Hologram yet, what’s stopped you? Here’s why I’m asking. Building a framework turns out to be two jobs, the framewo...
New
mat-hek
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn: This is possible because it now builds on a very stab...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews