Class: NewRelic::Security::Agent::Control::ApplicationRuntimeError
- Inherits:
-
Object
- Object
- NewRelic::Security::Agent::Control::ApplicationRuntimeError
- Defined in:
- lib/newrelic_security/agent/control/application_runtime_error.rb
Instance Attribute Summary collapse
-
#counter ⇒ Object
Returns the value of attribute counter.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#jsonName ⇒ Object
readonly
Returns the value of attribute jsonName.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(exception, ctxt, response_code, category) ⇒ ApplicationRuntimeError
constructor
A new instance of ApplicationRuntimeError.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(exception, ctxt, response_code, category) ⇒ ApplicationRuntimeError
Returns a new instance of ApplicationRuntimeError.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/newrelic_security/agent/control/application_runtime_error.rb', line 13 def initialize(exception, ctxt, response_code, category) @collectorType = RUBY @language = Ruby @jsonName = :'application-runtime-error' @eventType = :'application-runtime-error' @collectorVersion = NewRelic::Security::VERSION @buildNumber = nil @jsonVersion = NewRelic::Security::Agent.config[:json_version] @timestamp = current_time_millis @applicationUUID = NewRelic::Security::Agent.config[:uuid] @appAccountId = NewRelic::Security::Agent.config[:account_id] @appEntityGuid = NewRelic::Security::Agent.config[:entity_guid] @framework = NewRelic::Security::Agent.config[:framework] @groupName = NewRelic::Security::Agent.config[:mode] @policyVersion = nil @linkingMetadata = @httpRequest = get_http_request_data(ctxt) @exception = exception @counter = 1 @responseCode = response_code @category = category @traceId = generate_trace_id(ctxt, category) end |
Instance Attribute Details
#counter ⇒ Object
Returns the value of attribute counter.
11 12 13 |
# File 'lib/newrelic_security/agent/control/application_runtime_error.rb', line 11 def counter @counter end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
10 11 12 |
# File 'lib/newrelic_security/agent/control/application_runtime_error.rb', line 10 def exception @exception end |
#jsonName ⇒ Object (readonly)
Returns the value of attribute jsonName.
10 11 12 |
# File 'lib/newrelic_security/agent/control/application_runtime_error.rb', line 10 def jsonName @jsonName end |
Instance Method Details
#as_json ⇒ Object
37 38 39 40 41 |
# File 'lib/newrelic_security/agent/control/application_runtime_error.rb', line 37 def as_json instance_variables.map! do |ivar| [ivar[1..-1].to_sym, instance_variable_get(ivar)] end.to_h end |
#to_json(*_args) ⇒ Object
43 44 45 |
# File 'lib/newrelic_security/agent/control/application_runtime_error.rb', line 43 def to_json(*_args) as_json.to_json end |