Tracing.ObanTelemetry (Tracing v0.2.0)
Handles telemetry and events for Oban workers.
Allows a function reportable?/1
to be set in an oban worker to define in which case exceptions should be reported or
not. If reportable?/1
does not exist, all errors will be reported.
Example
defmodule MyApp.Application do
use Application
def start(_type, _args) do
# ...
Tracing.setup([:oban])
Supervisor.start_link([], [name: MyApp.Supervisor])
end
end
defmodule MyApp.ObanWorker do
use Oban.Worker, queue: "webhooks"
@impl Oban.Worker
def perform(args) do
# execute
end
def reportable?(meta) do
meta.attempt >= 3
end
end
Summary
Functions
Link to this function
handle_event(list, _, meta, _)
Link to this function