Sha256: 9955f8ac657933daa4902fa8e7d53efbe01d24fe1e76cca1816cddbeb52ba4cc

Contents?: true

Size: 839 Bytes

Versions: 6

Compression:

Stored size: 839 Bytes

Contents

# this class encapsulates an error that was noticed by RPM in a managed app.
# Unfortunately it was put in the agent in the global namespace early on and
# for backward compatibility it needs to remain here.
class NewRelic::NoticedError
  attr_accessor :path, :timestamp, :params, :exception_class, :message
  
  def initialize(path, data, exception)
    self.path = path
    self.params = data
    
    self.exception_class = exception.class.name
    
    if exception.respond_to?('original_exception')
      self.message = exception.original_exception.message.to_s
    else
      self.message = exception.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..4096] if self.message.length > 4096

    self.timestamp = Time.now
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
newrelic_rpm-2.9.9 lib/new_relic/noticed_error.rb
newrelic_rpm-2.9.8 lib/new_relic/noticed_error.rb
newrelic_rpm-2.9.6 lib/new_relic/noticed_error.rb
genki-newrelic_rpm-2.10.1 lib/new_relic/noticed_error.rb
newrelic_rpm-2.9.5 lib/new_relic/noticed_error.rb
newrelic_rpm-2.9.4 lib/new_relic/noticed_error.rb