You could hook into the queue producer’s telemetry events and emit logs:
defmodule ProducerLogger do
require Logger
def handle(_event, _measure, %{queue: queue, dispatched_count: count}, _opts) do
Logger.debug("[ProducerLogger] queue #{queue} dispatched #{count} jobs")
end
end
:telemetry.attach("queue-logger", [:oban, :producer, :stop], &ProducerLogger.handle/4, [])
The count should always be 1
based on your config. If not, something is awry.