Sends ErrorTracker errors to your phone through Boop.
ErrorTracker deliberately does not do notifications; this package attaches to the telemetry
events it emits and turns them into Boop events. It never touches ErrorTracker's database or
configuration, and it uses the boop_ex client to send.
Setup
Install error_tracker and configure it as usual, then add this package and boop_ex:
config :boop_ex,
url: System.fetch_env!("BOOP_URL"),
api_key: System.fetch_env!("BOOP_API_KEY")
config :boop_error_tracker,
environment: config_env(), # tag on every event; default: unknown
source: "my_app", # Boop `source`; default "error_tracker"
notify_on: [:new, :unresolved], # see below
throttle: :timer.minutes(10), # per-error minimum gap for :occurrence notifications
error_tracker_url: "https://my-app.com/dev/errors" # adds an "Open in ErrorTracker" buttonThe handler attaches automatically when the :boop_error_tracker application starts.
Set enabled: false to keep it off (for example in test).
What triggers a notification
ErrorTracker emits telemetry when an error is first seen, when a resolved error comes back,
and for every occurrence. notify_on picks which of those become pushes:
:new— a brand-new error ([:error_tracker, :error, :new]). Default on.:unresolved— an error that was marked resolved happens again. Default on.:occurrence— every occurrence of any error, throttled per error bythrottle. Default off; turn it on if you want to hear about ongoing errors, not just new ones.
Muted errors are never sent. All events use level :error; set level: :critical to make
pushes prominent.
Grouping and actions (Boop 1.2.0+)
Every event carries ErrorTracker's fingerprint, so Boop groups an error's occurrences into
one inbox row with a count and first/last seen; turning :occurrence on no longer floods
the inbox. Set error_tracker_url to the base URL of your ErrorTracker dashboard's errors
page (the error_tracker_dashboard route plus /errors) and each push gets an
"Open in ErrorTracker" button that jumps straight to the error. actions adds your own:
config :boop_error_tracker,
error_tracker_url: "https://my-app.com/dev/errors",
actions: fn error, _occurrence ->
[%{label: "Runbook", url: "https://wiki.example.com/errors/#{error.kind}"}]
end
Summary
Functions
Attaches the telemetry handler. Called automatically on application start; safe to call again.
Whether the handler is currently attached.
Detaches the telemetry handler.
Functions
@spec attach() :: :ok | {:error, :already_exists}
Attaches the telemetry handler. Called automatically on application start; safe to call again.
@spec attached?() :: boolean()
Whether the handler is currently attached.
@spec detach() :: :ok | {:error, :not_found}
Detaches the telemetry handler.