Sha256: 2f4ee39cbeda02e4d982042c0b581ca81b1d95b5dae3509f315edc7c82803499

Contents?: true

Size: 1.03 KB

Versions: 18

Compression:

Stored size: 1.03 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
end

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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sentry-sidekiq-5.2.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.2.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.1.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.1.0 lib/sentry-sidekiq.rb
sentry-sidekiq-5.0.2 lib/sentry-sidekiq.rb
sentry-sidekiq-5.0.1 lib/sentry-sidekiq.rb
sentry-sidekiq-5.0.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.9.2 lib/sentry-sidekiq.rb
sentry-sidekiq-4.9.1 lib/sentry-sidekiq.rb
sentry-sidekiq-4.9.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.8.3 lib/sentry-sidekiq.rb
sentry-sidekiq-4.8.2 lib/sentry-sidekiq.rb
sentry-sidekiq-4.8.1 lib/sentry-sidekiq.rb
sentry-sidekiq-4.8.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.7.3 lib/sentry-sidekiq.rb
sentry-sidekiq-4.7.2 lib/sentry-sidekiq.rb
sentry-sidekiq-4.7.1 lib/sentry-sidekiq.rb
sentry-sidekiq-4.7.0 lib/sentry-sidekiq.rb