Sha256: 94f48997965dd9225ed2696253cf11c710ec5ff3224d38c83147f7cbf32d8658

Contents?: true

Size: 814 Bytes

Versions: 19

Compression:

Stored size: 814 Bytes

Contents

# frozen_string_literal: true

require "rake"
require "rake/task"

module Sentry
  module Rake
    module Application
      # @api private
      def display_error_message(ex)
        Sentry.capture_exception(ex) 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? && !Sentry.configuration.skip_rake_integration

        super
      end
    end

    module Task
      # @api private
      def execute(args=nil)
        return super unless Sentry.initialized? && Sentry.get_current_hub

        super
      end
    end
  end
end

# @api private
module Rake
  class Application
    prepend(Sentry::Rake::Application)
  end

  class Task
    prepend(Sentry::Rake::Task)
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
sentry-ruby-5.4.2 lib/sentry/rake.rb
sentry-ruby-core-5.4.2 lib/sentry/rake.rb
sentry-ruby-5.4.1 lib/sentry/rake.rb
sentry-ruby-core-5.4.1 lib/sentry/rake.rb
sentry-ruby-core-5.4.0 lib/sentry/rake.rb
sentry-ruby-core-5.3.1 lib/sentry/rake.rb
sentry-ruby-core-5.3.0 lib/sentry/rake.rb
sentry-ruby-core-5.2.1 lib/sentry/rake.rb
sentry-ruby-core-5.2.0 lib/sentry/rake.rb
sentry-ruby-core-5.1.1 lib/sentry/rake.rb
sentry-ruby-core-5.1.0 lib/sentry/rake.rb
sentry-ruby-core-5.0.2 lib/sentry/rake.rb
sentry-ruby-core-5.0.1 lib/sentry/rake.rb
sentry-ruby-core-5.0.0 lib/sentry/rake.rb
sentry-ruby-core-4.9.2 lib/sentry/rake.rb
sentry-ruby-core-4.9.1 lib/sentry/rake.rb
sentry-ruby-core-4.9.0 lib/sentry/rake.rb
sentry-ruby-core-4.8.3 lib/sentry/rake.rb
sentry-ruby-core-4.8.2 lib/sentry/rake.rb