Sha256: 03785002f61c9ef60a50d6c316d945e7e12e37e83f35bb47df42af9db0be6319

Contents?: true

Size: 983 Bytes

Versions: 7

Compression:

Stored size: 983 Bytes

Contents

require "sidekiq"
require "sentry-ruby"
require "sentry/integrable"
require "sentry/sidekiq/version"
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?

          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

7 entries across 7 versions & 1 rubygems

Version Path
sentry-sidekiq-4.6.5 lib/sentry-sidekiq.rb
sentry-sidekiq-4.6.4 lib/sentry-sidekiq.rb
sentry-sidekiq-4.6.3 lib/sentry-sidekiq.rb
sentry-sidekiq-4.6.2 lib/sentry-sidekiq.rb
sentry-sidekiq-4.6.1 lib/sentry-sidekiq.rb
sentry-sidekiq-4.6.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.6.0.pre.beta.0 lib/sentry-sidekiq.rb