ScoutApm.Instruments.ObanTelemetry (scout_apm v2.0.0)
Copy MarkdownTelemetry handler for Oban job instrumentation.
Attaches to Oban telemetry events to track background jobs:
- Job executions appear as "Job" type background transactions
- Job names are derived from the worker module
Usage
In your application's start/2 function:
def start(_type, _args) do
ScoutApm.Instruments.ObanTelemetry.attach()
# ... rest of supervision tree
endThis will automatically instrument all Oban job executions in your application.
Transaction Naming
Jobs are named based on the worker module. For example:
MyApp.Workers.SendEmailbecomesJob/SendEmailMyApp.EmailWorkerbecomesJob/EmailWorker
Summary
Functions
Attaches telemetry handlers for Oban job events.
Detaches the telemetry handlers. Useful for testing.