← All platforms

Quantum error tracking

A scheduled job can fail while everyone is asleep. Report its exception with the Sentry Elixir SDK and keep it on your Telebugs server.

~/hoofnotes  nvim mix.exs config/config.exs lib/hoofnotes/jobs/sync.ex
defp deps do
[
{:sentry, "~> 13.0"},
{:jason, "~> 1.4"},
{:finch, "~> 0.21"}
]
end
import Config
config :sentry,
# Copy the complete Telebugs DSN, key and path included.
dsn: "YOUR_TELEBUGS_DSN",
environment_name: config_env()
defmodule Hoofnotes.Jobs.Sync do
def run do
Hoofnotes.Notes.sync()
rescue
error ->
Sentry.capture_exception(error, stacktrace: __STACKTRACE__)
reraise error, __STACKTRACE__
end
end
~/hoofnotes  mix deps.get
~/hoofnotes  iex -S mix

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep sentry and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Can I report a scheduled job’s exception?

Yes. Report it from the job with the Sentry Elixir SDK, including its backtrace. The example preserves the failure after reporting, rather than quietly treating the job as successful.

Will this tell me a job never ran?

No. Missing-job detection is cron monitoring. This page covers exceptions from Quantum jobs; Telebugs does not provide Sentry’s cron check-in service.