ScoutApm.Instruments.ObanTelemetry (scout_apm v2.0.0)

Copy Markdown

Telemetry 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
end

This will automatically instrument all Oban job executions in your application.

Transaction Naming

Jobs are named based on the worker module. For example:

  • MyApp.Workers.SendEmail becomes Job/SendEmail
  • MyApp.EmailWorker becomes Job/EmailWorker

Summary

Functions

Attaches telemetry handlers for Oban job events.

Detaches the telemetry handlers. Useful for testing.

Functions

attach()

Attaches telemetry handlers for Oban job events.

Call this once during application startup.

detach()

Detaches the telemetry handlers. Useful for testing.

handle_event(arg1, measurements, metadata, config)