Sha256: 454c9c8dce1a63fe548b8dfd2f85beec9c16a39ee552dde703264f5ce0c99e23

Contents?: true

Size: 915 Bytes

Versions: 56

Compression:

Stored size: 915 Bytes

Contents

APPSIGNAL_PUMA_PLUGIN_LOADED = true

# AppSignal Puma plugin
#
# This plugin ensures the minutely probe thread is started with the Puma
# minutely probe in the Puma master process.
#
# The constant {APPSIGNAL_PUMA_PLUGIN_LOADED} is here to mark the Plugin as
# loaded by the rest of the AppSignal gem. This ensures that the Puma minutely
# probe is not also started in every Puma workers, which was the old behavior.
# See {Appsignal::Hooks::PumaHook#install} for more information.
#
# For even more information:
# https://docs.appsignal.com/ruby/integrations/puma.html
Puma::Plugin.create do
  def start(launcher = nil)
    launcher.events.on_booted do
      require "appsignal"
      if ::Puma.respond_to?(:stats)
        require "appsignal/probes/puma"
        Appsignal::Minutely.probes.register :puma, Appsignal::Probes::PumaProbe
      end
      Appsignal.start
      Appsignal.start_logger
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
appsignal-2.11.10-java lib/puma/plugin/appsignal.rb
appsignal-2.11.10 lib/puma/plugin/appsignal.rb
appsignal-3.0.6-java lib/puma/plugin/appsignal.rb
appsignal-3.0.6 lib/puma/plugin/appsignal.rb
appsignal-3.0.5-java lib/puma/plugin/appsignal.rb
appsignal-3.0.5 lib/puma/plugin/appsignal.rb
appsignal-3.0.4-java lib/puma/plugin/appsignal.rb
appsignal-3.0.4 lib/puma/plugin/appsignal.rb
appsignal-3.0.4.alpha.1-java lib/puma/plugin/appsignal.rb
appsignal-3.0.4.alpha.1 lib/puma/plugin/appsignal.rb
appsignal-3.0.3-java lib/puma/plugin/appsignal.rb
appsignal-3.0.3 lib/puma/plugin/appsignal.rb
appsignal-3.0.2-java lib/puma/plugin/appsignal.rb
appsignal-3.0.2 lib/puma/plugin/appsignal.rb
appsignal-3.0.1-java lib/puma/plugin/appsignal.rb
appsignal-3.0.1 lib/puma/plugin/appsignal.rb
appsignal-3.0.0-java lib/puma/plugin/appsignal.rb
appsignal-3.0.0 lib/puma/plugin/appsignal.rb
appsignal-3.0.0.rc.1 lib/puma/plugin/appsignal.rb
appsignal-3.0.0.rc.1-java lib/puma/plugin/appsignal.rb