Sha256: 0b70ff5a08f9ff4ce02ebc13f24c34bec5584e0b92fe120ebda9abeb5e94c91d

Contents?: true

Size: 845 Bytes

Versions: 26

Compression:

Stored size: 845 Bytes

Contents

# This class encapsulates an error that was noticed by RPM in a managed app.
class NewRelic::NoticedError
  extend NewRelic::CollectionHelper
  attr_accessor :path, :timestamp, :params, :exception_class, :message

  def initialize(path, data, exception, timestamp = Time.now)
    self.path = path
    self.params = NewRelic::NoticedError.normalize_params(data)

    self.exception_class = exception.is_a?(Exception) ? exception.class.name : 'Error'

    if exception.respond_to?('original_exception')
      self.message = exception.original_exception.message.to_s
    else
      self.message = (exception || '<no message>').to_s
    end

    # clamp long messages to 4k so that we don't send a lot of
    # overhead across the wire
    self.message = self.message[0..4095] if self.message.length > 4096

    self.timestamp = timestamp
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
newrelic_rpm-3.0.1 lib/new_relic/noticed_error.rb
newrelic_rpm-3.1.0.beta1 lib/new_relic/noticed_error.rb
newrelic_rpm-3.0.0 lib/new_relic/noticed_error.rb
newrelic_rpm-3.0.0.beta2 lib/new_relic/noticed_error.rb
newrelic_rpm-3.0.0.beta1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.14.1.logging1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.14.1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.4.rum6 lib/new_relic/noticed_error.rb
newrelic_rpm-2.14.0 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.4.rum5 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.6.beta2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.6.beta1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.4.rum4 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.5.beta4 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.5.beta3 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.5.beta2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.5.beta1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.4.eum3 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.4.eum2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.13.4.eum1 lib/new_relic/noticed_error.rb