Sha256: 75d357633b82a38c078398951964d4808c0ed58396be923205cd4077027e66b4

Contents?: true

Size: 851 Bytes

Versions: 16

Compression:

Stored size: 851 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 ? exception.class.name : '<no exception>'
    
    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

16 entries across 16 versions & 2 rubygems

Version Path
onyx_newrelic_rpm-2.12.5 lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.3 lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.2.beta2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.2.beta lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.1.alpha lib/new_relic/noticed_error.rb
newrelic_rpm-2.12.0 lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.3 lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.2.beta2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.2.beta lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.0.beta2 lib/new_relic/noticed_error.rb
newrelic_rpm-2.11.0.beta lib/new_relic/noticed_error.rb
newrelic_rpm-2.10.8 lib/new_relic/noticed_error.rb