Sha256: ddd864434a8788de2482df6abac5c337caeb32934feb0cb4424c829bab2e0fd1

Contents?: true

Size: 816 Bytes

Versions: 60

Compression:

Stored size: 816 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

60 entries across 60 versions & 1 rubygems

Version Path
appsignal-3.7.0-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.7.0 lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.5-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.5 lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.4-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.4 lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.3-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.3 lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.2-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.2 lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.1-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.1 lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.0-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.6.0 lib/appsignal/hooks/sidekiq.rb
appsignal-3.5.6-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.5.6 lib/appsignal/hooks/sidekiq.rb
appsignal-3.5.5-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.5.5 lib/appsignal/hooks/sidekiq.rb
appsignal-3.5.4-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.5.4 lib/appsignal/hooks/sidekiq.rb