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.
Weāve been working on this for the last month and a half 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
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.
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.
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).
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
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
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.
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)?
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?
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.