Sha256: 3070d9460e2334a7f2695ee0e509d4d63e4a1e4e90f13a316eb9992efa5b50d3

Contents?: true

Size: 1.22 KB

Versions: 16

Compression:

Stored size: 1.22 KB

Contents

require "sidekiq"
require "sentry-ruby"
require "sentry/integrable"
require "sentry/sidekiq/version"
require "sentry/sidekiq/configuration"
require "sentry/sidekiq/error_handler"
require "sentry/sidekiq/sentry_context_middleware"

module Sentry
  module Sidekiq
    extend Sentry::Integrable

    register_integration name: "sidekiq", version: Sentry::Sidekiq::VERSION

    if defined?(::Rails::Railtie)
      class Railtie < ::Rails::Railtie
        config.after_initialize do
          next unless Sentry.initialized? && defined?(::Sentry::Rails)

          Sentry.configuration.rails.skippable_job_adapters << "ActiveJob::QueueAdapters::SidekiqAdapter"
        end
      end
    end
  end
end

Sidekiq.configure_server do |config|
  config.error_handlers << Sentry::Sidekiq::ErrorHandler.new
  config.server_middleware do |chain|
    chain.add Sentry::Sidekiq::SentryContextServerMiddleware
  end
  config.client_middleware do |chain|
    chain.add Sentry::Sidekiq::SentryContextClientMiddleware
  end
end

Sidekiq.configure_client do |config|
  config.client_middleware do |chain|
    chain.add Sentry::Sidekiq::SentryContextClientMiddleware
  end
end

# patches
require "sentry/sidekiq/cron/job"
require "sentry/sidekiq-scheduler/scheduler"

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sentry-sidekiq-5.20.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.20.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.19.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.18.2 lib/sentry-sidekiq.rb
sentry-sidekiq-5.18.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.18.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.17.3 lib/sentry-sidekiq.rb
sentry-sidekiq-5.17.2 lib/sentry-sidekiq.rb
sentry-sidekiq-5.17.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.17.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.16.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.16.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.15.2 lib/sentry-sidekiq.rb
sentry-sidekiq-5.15.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.15.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.14.0 lib/sentry-sidekiq.rb