Sha256: 7f22ee471ea964fa4d701c1cc3c62d15ac9778c949f6a4489c56de5451066b1a

Contents?: true

Size: 818 Bytes

Versions: 108

Compression:

Stored size: 818 Bytes

Contents

# frozen_string_literal: true

module Appsignal
  class Hooks
    class SidekiqHook < Appsignal::Hooks::Hook
      register :sidekiq

      def dependencies_present?
        defined?(::Sidekiq)
      end

      def install
        require "appsignal/integrations/sidekiq"
        Appsignal::Minutely.probes.register :sidekiq, Appsignal::Probes::SidekiqProbe

        ::Sidekiq.configure_server do |config|
          config.error_handlers << \
            Appsignal::Integrations::SidekiqErrorHandler.new

          config.server_middleware do |chain|
            if chain.respond_to? :prepend
              chain.prepend Appsignal::Integrations::SidekiqMiddleware
            else
              chain.add Appsignal::Integrations::SidekiqMiddleware
            end
          end
        end
      end
    end
  end
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
appsignal-3.3.11-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.11 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.0-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.0 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.10-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.10 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.9-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.9 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.8-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.8 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.7-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.7 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.6-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.6 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.5-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.5 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.4-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.4 lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.3-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.3.3 lib/appsignal/hooks/sidekiq.rb