Sha256: 3b6df27abb13778e788c8445bcdbc6e629f3f4ffec5c9b4a0c52965a39c4fcb8

Contents?: true

Size: 831 Bytes

Versions: 8

Compression:

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sentry-sidekiq-4.5.2 lib/sentry-sidekiq.rb
sentry-sidekiq-4.5.1 lib/sentry-sidekiq.rb
sentry-sidekiq-4.5.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.5.0.pre.beta.1 lib/sentry-sidekiq.rb
sentry-sidekiq-4.4.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.4.0.pre.beta.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.3.0 lib/sentry-sidekiq.rb
sentry-sidekiq-4.2.1 lib/sentry-sidekiq.rb