Sha256: c7a95009232b4158b4b858cd1e242738f85a6f8b81a8125e67fa0a977454a84c

Contents?: true

Size: 465 Bytes

Versions: 20

Compression:

Stored size: 465 Bytes

Contents

require "rake"
require "rake/task"

module Rake
  class Application
    alias orig_display_error_messsage display_error_message
    def display_error_message(ex)
      Sentry.capture_exception(ex, hint: { background: false }) do |scope|
        task_name = top_level_tasks.join(' ')
        scope.set_transaction_name(task_name)
        scope.set_tag("rake_task", task_name)
      end if Sentry.initialized?

      orig_display_error_messsage(ex)
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
sentry-ruby-core-4.5.0.pre.beta.1 lib/sentry/rake.rb
sentry-ruby-core-4.4.2 lib/sentry/rake.rb
sentry-ruby-core-4.4.1 lib/sentry/rake.rb
sentry-ruby-core-4.4.0 lib/sentry/rake.rb
sentry-ruby-core-4.4.0.pre.beta.0 lib/sentry/rake.rb
sentry-ruby-core-4.3.2 lib/sentry/rake.rb
sentry-ruby-core-4.3.1 lib/sentry/rake.rb
sentry-ruby-core-4.3.0 lib/sentry/rake.rb
sentry-ruby-core-4.2.2 lib/sentry/rake.rb
sentry-ruby-core-4.2.1 lib/sentry/rake.rb
sentry-ruby-core-4.2.0 lib/sentry/rake.rb
sentry-ruby-core-4.1.6 lib/sentry/rake.rb
sentry-ruby-core-4.1.5 lib/sentry/rake.rb
sentry-ruby-core-4.1.5.pre.beta.1 lib/sentry/rake.rb
sentry-ruby-core-4.1.5.pre.beta.0 lib/sentry/rake.rb
sentry-ruby-4.1.4 lib/sentry/rake.rb
sentry-ruby-4.1.3 lib/sentry/rake.rb
sentry-ruby-4.1.2 lib/sentry/rake.rb
sentry-ruby-4.1.1 lib/sentry/rake.rb
sentry-ruby-4.1.0 lib/sentry/rake.rb