Sha256: 995957cfe9098e174b7707ee375437baf580a5f54c44b2e119c95a0565d95b02

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 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.config.sentry_key => Memolog.dump)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
memolog-0.3.2 lib/memolog/sentry_extension.rb