Class: Contrast::Agent::Reporting::ApplicationStartup
- Inherits:
-
ApplicationReportingEvent
- Object
- ReportableHash
- ReportingEvent
- ApplicationReportingEvent
- Contrast::Agent::Reporting::ApplicationStartup
- Defined in:
- lib/contrast/agent/reporting/reporting_events/application_startup.rb
Overview
This is the new ApplicationStartup class which will include all the needed information for the new reporting system to report an Application has started; creating a new one or marking an existing one as online in the Contrast UI
Instance Attribute Summary
Attributes inherited from ReportingEvent
#event_endpoint, #event_method
Instance Method Summary collapse
- #file_name ⇒ Object
-
#initialize ⇒ ApplicationStartup
constructor
A new instance of ApplicationStartup.
-
#to_controlled_hash ⇒ Hash
Convert the instance variables on the class, and other information, into the identifiers required for TeamServer to process the JSON form of this message.
Methods inherited from ReportingEvent
Methods inherited from ReportableHash
#event_json, #valid?, #validate
Methods included from Components::Logger::InstanceMethods
Constructor Details
#initialize ⇒ ApplicationStartup
Returns a new instance of ApplicationStartup.
15 16 17 18 19 |
# File 'lib/contrast/agent/reporting/reporting_events/application_startup.rb', line 15 def initialize @event_method = :PUT @event_endpoint = Contrast::Agent::Reporting::Endpoints::NG_ENDPOINTS[:application_create] super() end |
Instance Method Details
#file_name ⇒ Object
21 22 23 |
# File 'lib/contrast/agent/reporting/reporting_events/application_startup.rb', line 21 def file_name 'applications-create' end |
#to_controlled_hash ⇒ Hash
Convert the instance variables on the class, and other information, into the identifiers required for TeamServer to process the JSON form of this message.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/contrast/agent/reporting/reporting_events/application_startup.rb', line 29 def to_controlled_hash app_config = ::Contrast::CONFIG.application { code: app_config.code, group: app_config.group, instrumentation: Contrast::Agent::Reporting::ApplicationStartupInstrumentation.new.to_controlled_hash, metadata: app_config., session_id: ::Contrast::CONFIG.session_id, session_metadata: ::Contrast::CONFIG., tags: app_config. }.compact end |