Sha256: edd77a4ec6ec31e8a1772ec55e40242ec19faef00bc44cf7c605117361adfa46

Contents?: true

Size: 569 Bytes

Versions: 75

Compression:

Stored size: 569 Bytes

Contents

module Sentry
  module Rails
    module ControllerMethods
      def capture_message(message, options = {})
        with_request_scope do
          Sentry::Rails.capture_message(message, **options)
        end
      end

      def capture_exception(exception, options = {})
        with_request_scope do
          Sentry::Rails.capture_exception(exception, **options)
        end
      end

      private

      def with_request_scope
        Sentry.with_scope do |scope|
          scope.set_rack_env(request.env)
          yield
        end
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
sentry-rails-5.20.1 lib/sentry/rails/controller_methods.rb
sentry-rails-5.20.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.19.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.18.2 lib/sentry/rails/controller_methods.rb
sentry-rails-5.18.1 lib/sentry/rails/controller_methods.rb
sentry-rails-5.18.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.17.3 lib/sentry/rails/controller_methods.rb
sentry-rails-5.17.2 lib/sentry/rails/controller_methods.rb
sentry-rails-5.17.1 lib/sentry/rails/controller_methods.rb
sentry-rails-5.17.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.16.1 lib/sentry/rails/controller_methods.rb
sentry-rails-5.15.2 lib/sentry/rails/controller_methods.rb
sentry-rails-5.15.1 lib/sentry/rails/controller_methods.rb
sentry-rails-5.15.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.14.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.13.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.12.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.11.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.10.0 lib/sentry/rails/controller_methods.rb
sentry-rails-5.9.0 lib/sentry/rails/controller_methods.rb