mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 01:22:15 +03:00
8d1039b8ce
* Upgrades Oban to v2.6.1 * Use correct clickhouse_ecto
15 lines
466 B
Elixir
15 lines
466 B
Elixir
defmodule ErrorReporter do
|
|
def handle_event([:oban, :job, :exception], measure, %{job: job} = meta, _) do
|
|
extra =
|
|
job
|
|
|> Map.take([:id, :args, :meta, :queue, :worker])
|
|
|> Map.merge(measure)
|
|
|
|
Sentry.capture_exception(meta.error, stacktrace: meta.stacktrace, extra: extra)
|
|
end
|
|
|
|
def handle_event([:oban, :circuit, :trip], _measure, meta, _) do
|
|
Sentry.capture_exception(meta.error, stacktrace: meta.stacktrace, extra: meta)
|
|
end
|
|
end
|