Module: Sentry::Integrable
- Defined in:
- lib/sentry/integrable.rb
Instance Method Summary collapse
- #capture_check_in(slug, status, **options, &block) ⇒ Object
- #capture_exception(exception, **options, &block) ⇒ Object
- #capture_message(message, **options, &block) ⇒ Object
- #integration_name ⇒ Object
- #register_integration(name:, version:) ⇒ Object
Instance Method Details
#capture_check_in(slug, status, **options, &block) ⇒ Object
30 31 32 33 34 |
# File 'lib/sentry/integrable.rb', line 30 def capture_check_in(slug, status, **, &block) [:hint] ||= {} [:hint][:integration] = integration_name Sentry.capture_check_in(slug, status, **, &block) end |
#capture_exception(exception, **options, &block) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/sentry/integrable.rb', line 14 def capture_exception(exception, **, &block) [:hint] ||= {} [:hint][:integration] = integration_name # within an integration, we usually intercept uncaught exceptions so we set handled to false. [:hint][:mechanism] ||= Sentry::Mechanism.new(type: integration_name, handled: false) Sentry.capture_exception(exception, **, &block) end |
#capture_message(message, **options, &block) ⇒ Object
24 25 26 27 28 |
# File 'lib/sentry/integrable.rb', line 24 def (, **, &block) [:hint] ||= {} [:hint][:integration] = integration_name Sentry.(, **, &block) end |
#integration_name ⇒ Object
10 11 12 |
# File 'lib/sentry/integrable.rb', line 10 def integration_name @integration_name end |
#register_integration(name:, version:) ⇒ Object
5 6 7 8 |
# File 'lib/sentry/integrable.rb', line 5 def register_integration(name:, version:) Sentry.register_integration(name, version) @integration_name = name end |