ErrorTracker - an Elixir-based built-in error tracking solution

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

Screenshots

64 Likes

This is very cool :heart:

5 Likes

That is great. just yesterday I was looking for phoenix related monitoring and logging related libraries or configuration monitoring

3 Likes

Weā€™ve been working on this for the last month and a half :smiley: There are a lot of things to polish yet, but we believe it is a good starting point to release it.

As for now it only tracks exceptions and not performance, but the base is there to add more features in the future :rocket:

8 Likes

Very nice! Are there plans to add a JS package to handle catching client-side errors?

2 Likes

It is really a good start :smiley:

If you are accepting suggestions for roadmap maybe real time tracking , performance metrics and notifications/alerts .
I think those would be more than enough for most monitoring needs.

2 Likes

Thank you for building and releasing this. I had ā€œinstall and integrate Sentryā€ on my TODO list that I will now happily cross off as ErrorTracker is a very suitable lightweight replacement. (I wanted this introspection, but the whole project Iā€™m using will be running on less than Sentryā€™s self-hosted minimum system requirements.

Was able to quickly install and demo it during todayā€™s frelix meeting ( local thread )

3 Likes

Can/will it handle errors from other applications or is it just for the single node?

1 Like

@belaustegui, thank you for publishing this.

I think it would be great to be able to delete errors, too, since they might contain data one doesnā€™t want to keep forever (f.i. due to GDPR and the like).

3 Likes

It could be a configuration to enable/disable it in logging. As in example in payments most loggers come with capability to configure sensitive data fields like card number which should be logged as masked or never

1 Like

This looks fantastic! Canā€™t wait to give it a try! Felicitaciones!

2 Likes

I it very cool thank you for the lib.

I have global question, is there any security consideration to use lib for tracking the log especially any malicious command or XSS for example?
Thank you

1 Like

For now thatā€™s outside the scope, as the schemas used are thought to store Elixir/Erlang exceptions, and some features may not work as expected with JS exceptions. It is not impossible but not on the roadmap as for now.

As long as they are Elixir/Erlang applications and have the library installed, they can technically share the same database, at least in itā€™s current state. It may not be the recommended setup as you are going to see errors from other applications, but it can be done.

Thatā€™s definitively on the roadmap and will be released in a new version soon.

The library uses Phoenix and Ecto, and we are not using unescaped values anywhere, so the only thing to take care about is to put some protections on the UI to avoid anonymous people accessing it.

5 Likes

Awesome :star_struck::star_struck::star_struck:

2 Likes

This looks amazing! :clap:

Any plans to integrate alarms with warmup/cool down? Performance tracking?

1 Like

Awesome. I was looking for something like this.

3 Likes

Perfect. Just what I been wanting for simple projects. Any way to ā€œhookā€ into it to create notifications/alerts (if you dont plan to include that too)?

3 Likes

This looks great, though Iā€™m having trouble deploying it to a Fly.io app. Iā€™ve followed the Getting Started guide, but the ErrorTracker.Web dashboard is crashing because it seemingly canā€™t find ErrorTrackerā€™s assets:

[info]Server: decodr.me:80 (http)
[info]Request: GET /dashboard/errors
[info]** (exit) an exception was raised:
[info]    ** (File.Error) could not read file "/app/_build/prod/lib/error_tracker/priv/static/app.css": no such file or directory
[info]        (elixir 1.15.3) lib/file.ex:358: File.read!/1
[info]        (error_tracker 0.1.1) lib/error_tracker/web/components/layouts/root.html.heex:14: anonymous fn/2 in ErrorTracker.Web.Layouts.root/1
[info]        (phoenix_live_view 0.20.2) lib/phoenix_live_view/engine.ex:150: Phoenix.HTML.Safe.Phoenix.LiveView.Rendered.to_iodata/1
[info]        (phoenix 1.7.14) lib/phoenix/controller.ex:1008: anonymous fn/5 in Phoenix.Controller.template_render_to_iodata/4
[info]        (telemetry 1.2.1) /app/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
[info]        (phoenix 1.7.14) lib/phoenix/controller.ex:974: Phoenix.Controller.render_and_send/4
[info]        (phoenix 1.7.14) lib/phoenix/router.ex:484: Phoenix.Router.__call__/5
[info]        (decodr 0.1.0) lib/decodr_web/endpoint.ex:1: DecodrWeb.Endpoint.plug_builder_call/2

My appā€™s own app.css compiles fine with Tailwind on deploy. Is there another step necessary to get ErrorTrackerā€™s assets to compile?

2 Likes

Not yet, but is definitely on our plans to make such integrations possible.

Ouch :see_no_evil: Would you mind opening an issue? Are you using releases or runnnig directly with mix?

3 Likes

Also having this issue. Iā€™m using the standard phoenix generated Dockerfile.
Useful snippets:

RUN cd assets && npm install 

COPY package.json package.json
RUN npm install

# compile assets
RUN mix assets.deploy

# Compile the release
RUN mix compile

# Changes to config/runtime.exs don't require recompiling the code
COPY config/runtime.exs config/

COPY rel rel
RUN mix release

ā€¦

# Only copy the final release from the build stage
COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/app_name ./

USER nobody

# If using an environment that doesn't automatically reap zombie processes, it is
# advised to add an init process such as tini via `apt-get install`
# above and adding an entrypoint. See https://github.com/krallin/tini for details
# ENTRYPOINT ["/tini", "--"]

CMD ["/app/bin/server"]

Iā€™ll open an issue as well - have to say this project looks great.