Sha256: 1991a4c8aedf53eb61efb8551bdd75213f210665472b7f546feedd2a18e83966

Contents?: true

Size: 887 Bytes

Versions: 20

Compression:

Stored size: 887 Bytes

Contents

# frozen_string_literal: true

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

    def integration_name
      @integration_name
    end

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

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

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

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
sentry-ruby-core-5.17.1 lib/sentry/integrable.rb
sentry-ruby-5.17.1 lib/sentry/integrable.rb
sentry-ruby-5.17.0 lib/sentry/integrable.rb
sentry-ruby-core-5.17.0 lib/sentry/integrable.rb
sentry-ruby-core-5.16.1 lib/sentry/integrable.rb
sentry-ruby-5.16.1 lib/sentry/integrable.rb
sentry-ruby-5.16.0 lib/sentry/integrable.rb
sentry-ruby-core-5.16.0 lib/sentry/integrable.rb
sentry-ruby-5.15.2 lib/sentry/integrable.rb
sentry-ruby-core-5.15.2 lib/sentry/integrable.rb
sentry-ruby-core-5.15.1 lib/sentry/integrable.rb
sentry-ruby-5.15.1 lib/sentry/integrable.rb
sentry-ruby-5.15.0 lib/sentry/integrable.rb
sentry-ruby-core-5.15.0 lib/sentry/integrable.rb
sentry-ruby-5.14.0 lib/sentry/integrable.rb
sentry-ruby-core-5.14.0 lib/sentry/integrable.rb
sentry-ruby-5.13.0 lib/sentry/integrable.rb
sentry-ruby-core-5.13.0 lib/sentry/integrable.rb
sentry-ruby-5.12.0 lib/sentry/integrable.rb
sentry-ruby-core-5.12.0 lib/sentry/integrable.rb