Baton.Application (Baton v0.27.4)

Copy Markdown View Source

Starts when the :baton dependency starts and attaches Baton's telemetry handlers, so they are active whether or not the host installs Baton.Plugin.

Two handlers, both keyed off Oban's job telemetry:

  • Baton.RescheduleReporter ([:oban, :job, :stop]) — nudges a completed step's downstream dependents so they dispatch promptly instead of waiting for the Stager.
  • Baton.CompletionReporter ([:oban, :job, :exception]) — announces a crash-terminated workflow the instant it settles.

Attaching here (rather than from the plugin) keeps the latency-sensitive paths independent of the plugin and makes them work out of the box in tests. The handlers resolve their repo/Oban instance lazily when they fire, so they don't care that the host's Oban may start after :baton.