@sorentwo Is there an easy way to report on cron jobs that did not run?
We currently use Pro + Web.
There have been numerous occasions where crons have not run.
Sometimes it is a code issue, sometimes the issue is unknown.
Thanks
@sorentwo Is there an easy way to report on cron jobs that did not run?
We currently use Pro + Web.
There have been numerous occasions where crons have not run.
Sometimes it is a code issue, sometimes the issue is unknown.
Thanks
Sentry for Elixir has support for cron monitoring so you can be notified if a cron job doesn’t run as scheduled. Recent versions of Pro (v1.3+) also have scheduling guarantees for DynamicCron, so it will ensure a job isn’t missed due to a restart or leadership issue.
Thanks @sorentwo.
It appears we’ve had Sentry Cron monitoring setup for several months. But nothing is showing in the Sentry UI. I guess we never finished setting up / testing the integration.
runtime.exs
config :sentry,
dsn: "https://123@123.ingest.sentry.io/123",
environment_name: environment_name,
enable_source_code_context: true,
root_source_code_paths: [File.cwd!()],
context_lines: 10,
tags: %{
env: environment_name
},
integrations: [
oban: [
capture_errors: true,
cron: [enabled: true]
]
]
config :my_app, Oban,
prefix: "public",
repo: MyApp.Repo,
plugins: [
{Oban.Pro.Plugins.DynamicPruner, mode: {:max_age, {14, :days}}},
{Oban.Pro.Plugins.DynamicCron, timezone: "America/Los_Angeles", crontab: default_cron_jobs},
{Oban.Pro.Plugins.DynamicLifeline,
rescue_interval: :timer.minutes(2), timeout: :timer.minutes(1)}
]
Versions:
{:sentry, "~> 10.7.1"},
{:oban_web, "~> 2.10.5", repo: "oban"},
{:oban_pro, "~> 1.4.12", repo: "oban"},
{:oban, "~> 2.18.2"},
Yes, the integrations works with DynamicCron. You should be able to check in the Sentry dashboard.
You might be missing something in the setup. Have you looked in Sentry, in the Crons Tab, do you see the jobs listed? Do they show up?
@sorenone Thanks…
There was not any data in the Sentry Cron UI.
I’ve replicated the config in development and now I’m seeing results.
I guess there is a config issue somewhere. I will play around and post results.