Sha256: dc0905846687fd13daa293f5167f65e54cc1150ea870dd668c810ec7d6901197

Contents?: true

Size: 685 Bytes

Versions: 13

Compression:

Stored size: 685 Bytes

Contents

require "sentry-raven"
require "govuk_app_config/govuk_statsd"
require "govuk_app_config/govuk_error/configuration"
require "govuk_app_config/version"

module GovukError
  def self.notify(exception_or_message, args = {})
    # Allow users to use `parameters` as a key like the Airbrake
    # client, allowing easy upgrades.
    args[:extra] ||= {}
    args[:extra].merge!(parameters: args.delete(:parameters))

    args[:tags] ||= {}
    args[:tags][:govuk_app_config_version] = GovukAppConfig::VERSION

    Raven.capture_exception(exception_or_message, args)
  end

  def self.configure
    @configuration ||= Configuration.new(Raven.configuration)
    yield @configuration
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
govuk_app_config-3.3.0 lib/govuk_app_config/govuk_error.rb
govuk_app_config-3.2.0 lib/govuk_app_config/govuk_error.rb
govuk_app_config-3.1.1 lib/govuk_app_config/govuk_error.rb
govuk_app_config-3.1.0 lib/govuk_app_config/govuk_error.rb
govuk_app_config-3.0.0 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.10.0 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.9.1 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.9.0 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.8.4 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.8.3 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.8.2 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.8.1 lib/govuk_app_config/govuk_error.rb
govuk_app_config-2.8.0 lib/govuk_app_config/govuk_error.rb