Skip to content

Commit

Permalink
disabled event sending
Browse files Browse the repository at this point in the history
  • Loading branch information
prateeksen committed Dec 26, 2024
1 parent 50c1d71 commit 24e16d4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/newrelic_security/agent/control/event_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ def send_app_info
app_info.update_app_info
NewRelic::Security::Agent.logger.info "Sending application info : #{app_info.to_json}"
NewRelic::Security::Agent.init_logger.info "Sending application info : #{app_info.to_json}"
enqueue(app_info)
# enqueue(app_info)
app_info = nil
end

def send_application_url_mappings
application_url_mappings = NewRelic::Security::Agent::Control::ApplicationURLMappings.new
application_url_mappings.update_application_url_mappings
NewRelic::Security::Agent.logger.info "Sending application URL Mappings : #{application_url_mappings.to_json}"
enqueue(application_url_mappings)
# enqueue(application_url_mappings)
application_url_mappings = nil
end

Expand All @@ -45,7 +45,7 @@ def send_event(event)
else
NewRelic::Security::Agent.agent.rasp_event_stats.processed.increment
end
enqueue(event)
# enqueue(event)
if @first_event
NewRelic::Security::Agent.init_logger.info "[STEP-8] => First event sent for validation. Security agent started successfully : #{event.to_json}"
NewRelic::Security::Agent.config.traffic_start_time = current_time_millis unless NewRelic::Security::Agent.config[:traffic_start_time]
Expand All @@ -58,7 +58,7 @@ def send_health
health = NewRelic::Security::Agent::Control::Health.new
health.update_health_check
NewRelic::Security::Agent.logger.info "Sending healthcheck : #{health.to_json}"
NewRelic::Security::Agent::Control::WebsocketClient.instance.send(health)
# NewRelic::Security::Agent::Control::WebsocketClient.instance.send(health)
health = nil
end

Expand All @@ -70,7 +70,7 @@ def send_critical_message(message, level, caller, thread_name, exc)
exception[:stackTrace] = exc.backtrace.map(&:to_s)
end
critical_message = NewRelic::Security::Agent::Control::CriticalMessage.new(message, level, caller, thread_name, exception)
enqueue(critical_message)
# enqueue(critical_message)
critical_message = nil
end

Expand All @@ -95,7 +95,7 @@ def create_dequeue_threads
loop do
begin
data_to_be_sent = @eventQ.pop
NewRelic::Security::Agent::Control::WebsocketClient.instance.send(data_to_be_sent)
# NewRelic::Security::Agent::Control::WebsocketClient.instance.send(data_to_be_sent)
rescue => exception
NewRelic::Security::Agent.logger.error "Exception in event pop operation : #{exception.inspect}"
end
Expand Down

0 comments on commit 24e16d4

Please sign in to comment.