Class: Contrast::Agent::StaticAnalysis
- Extended by:
- Components::Logger::InstanceMethods
- Includes:
- Components::Scope::InstanceMethods, Singleton
- Defined in:
- lib/contrast/agent/middleware/static_analysis.rb
Overview
this module handles one time static analysis tasks
Class Method Summary collapse
-
.catchup ⇒ Object
After the first request is complete, we do a one-time manual catchup to review and report the already-loaded gems.
- .send_inventory_message ⇒ Object
Methods included from Components::Logger::InstanceMethods
Methods included from Components::Scope::InstanceMethods
#contrast_enter_method_scopes!, #contrast_exit_method_scopes!, #with_app_scope, #with_contrast_scope, #with_deserialization_scope, #with_split_scope
Class Method Details
.catchup ⇒ Object
After the first request is complete, we do a one-time manual catchup to review and report the already-loaded gems.
19 20 21 22 23 24 |
# File 'lib/contrast/agent/middleware/static_analysis.rb', line 19 def catchup @_catchup ||= begin threaded_analysis! true end end |
.send_inventory_message ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/contrast/agent/middleware/static_analysis.rb', line 26 def return unless ::Contrast::INVENTORY.enable report = Contrast::Agent::Reporting::ApplicationUpdate.new # This convert here is left as it'll be easier to be replaced when the Library is being changed report.libraries = Contrast::Agent::Inventory::DependencyAnalysis.instance.library_pb_list Contrast::Agent::Inventory::DatabaseConfig.append_db_config(report) [report, Contrast::Agent::Reporting::ApplicationInventory.new].each do |e| Contrast::Agent.reporter.send_event(e) end end |