Class: Foam::Otel::PayloadCaptureRailtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- Foam::Otel::PayloadCaptureRailtie
- Defined in:
- lib/foam/otel/payload_capture.rb
Overview
The zero-effort Rails path, defined only when Rails loaded first (the
standard Gemfile order). Unlike the action_pack railtie's
before_initialize (which runs before config/initializers — before
Foam::Otel.init has resolved the capture mode), this hook runs AFTER
:load_config_initializers, when the mode is known, and still before
the middleware stack finalizes — so an :off config really ships ZERO
middleware. When foam-otel loads first (no Railtie), init()'s
install_rails_middleware! fallback covers apps that init before
Rails.application.initialize! completes (README recipe), and
plain-Rack apps use Foam::Otel::PayloadCapture manually.