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.4.10-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.10 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.9-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.9 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.8-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.8 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.7-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.7 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.6-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.6 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.5-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.5 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.4-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.4 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.3-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.3 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.2-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.2 lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.1-java lib/appsignal/hooks/sidekiq.rb
appsignal-3.4.1 lib/appsignal/hooks/sidekiq.rb