Module: Sentry::Rake::Application

Included in:
Rake::Application
Defined in:
lib/sentry/rake.rb

Instance Method Summary collapse

Instance Method Details

#display_error_message(ex) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/sentry/rake.rb', line 10

def display_error_message(ex)
  mechanism = Sentry::Mechanism.new(type: 'rake', handled: false)

  Sentry.capture_exception(ex, hint: { mechanism: mechanism }) do |scope|
    task_name = top_level_tasks.join(' ')
    scope.set_transaction_name(task_name, source: :task)
    scope.set_tag("rake_task", task_name)
  end if Sentry.initialized? && !Sentry.configuration.skip_rake_integration

  super
end