Instrumenting Oban

Hey all!

We instrument our applications with NewRelic APM and we’d like to start instrumenting Oban as well. Has anyone gone down this path and would you be willing to share your setup/story?

1 Like

Oban leverages Telemetry to emit events that occur internally. You can use these events to generate metrics that you want to capture: https://hexdocs.pm/oban/Oban.Telemetry.html

You would probably want to capture things like time to process a job, job error count, how many jobs are being published and then perhaps a cron job to poll queue length.

Unfortunately I don’t have much more advice aside from that as I am actually a few weeks out from adding the Oban monitoring plugin to PromEx (but that is Grafana and Prometheus specific and not NewRelic): https://github.com/akoutmos/prom_ex

2 Likes

As @akoutmos mentioned, there are telemetry events for you to hook into. We use the telemetry events for logs, live dashboard, and for Prometheus. However, I haven’t used NewRelic APM in Elixir, so I can’t speak to how you’d integrate it.

I’ll keep my eye on this thread to see if other’s have some suggestions. I’ve been meaning to write an article or a guide on this—at this point I’ll probably wait to see what happens in prom_ex

2 Likes

Not NewRelic specific, but integration of Oban with AppSignal

(we deleted some code from the master version, which we’ll put back in soon)