The Oban.Telemerty Hex docs talk about “Job Events” vs “Engine Events”. I’m trying to figure out, specifically, what the difference would be between [:oban, :job, :stop]
and [:oban, :engine, :complete_job, :stop]
? Which would be more appropriate to measure how long a worker takes to complete?
You should use Job Events to track Job activity. Those events are emitted by the process that runs the job and includes details like duration
, which is the “time to complete” you’re looking for.
The Engine Events are useful for tracking how long operations that involve the database/storage take. That’s separate from job execution itself and won’t include the metrics you’re looking for.
3 Likes