Sha256: 019b53996c61f7a2e8296a9bf99f6368e722883a9c7e48f3d80e8fc8c7589232

Contents?: true

Size: 517 Bytes

Versions: 7

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

module Memolog::SentryExtension
  def self.prepended(base)
    base.singleton_class.send(:prepend, ClassMethods)
  end

  module ClassMethods
    def capture_exception(exception, **options, &block)
      set_extras_memolog!
      super
    end

    def capture_message(message, **options, &block)
      set_extras_memolog!
      super
    end

    def set_extras_memolog!
      return unless get_current_scope
      set_extras(memolog: Memolog.dump(parse_json: true))
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
memolog-0.5.6 lib/memolog/sentry_extension.rb
memolog-0.5.5 lib/memolog/sentry_extension.rb
memolog-0.5.4 lib/memolog/sentry_extension.rb
memolog-0.5.3 lib/memolog/sentry_extension.rb
memolog-0.5.2 lib/memolog/sentry_extension.rb
memolog-0.5.1 lib/memolog/sentry_extension.rb
memolog-0.5.0 lib/memolog/sentry_extension.rb