Module: Sentry::Integrable

Defined in:
lib/sentry/integrable.rb

Instance Method Summary collapse

Instance Method Details

#capture_exception(exception, **options, &block) ⇒ Object



12
13
14
15
16
# File 'lib/sentry/integrable.rb', line 12

def capture_exception(exception, **options, &block)
  options[:hint] ||= {}
  options[:hint][:integration] = integration_name
  Sentry.capture_exception(exception, **options, &block)
end

#capture_message(message, **options, &block) ⇒ Object



18
19
20
21
22
# File 'lib/sentry/integrable.rb', line 18

def capture_message(message, **options, &block)
  options[:hint] ||= {}
  options[:hint][:integration] = integration_name
  Sentry.capture_message(message, **options, &block)
end

#integration_nameObject



8
9
10
# File 'lib/sentry/integrable.rb', line 8

def integration_name
  @integration_name
end

#register_integration(name:, version:) ⇒ Object



3
4
5
6
# File 'lib/sentry/integrable.rb', line 3

def register_integration(name:, version:)
  Sentry.register_integration(name, version)
  @integration_name = name
end