From 59386081b1762a41d9527a5f1fa941e1da2a28c3 Mon Sep 17 00:00:00 2001 From: Rabbit Date: Tue, 13 Aug 2024 13:11:16 +0800 Subject: [PATCH 1/2] chore: update newrelic conf (#2131) --- app/services/charts/daily_statistic_generator.rb | 2 +- config/newrelic.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/services/charts/daily_statistic_generator.rb b/app/services/charts/daily_statistic_generator.rb index 343909873..268b136d4 100644 --- a/app/services/charts/daily_statistic_generator.rb +++ b/app/services/charts/daily_statistic_generator.rb @@ -18,7 +18,7 @@ def call daily_statistic rescue Exception => e - NewRelic::Agent.notice_error(e.message) + NewRelic::Agent.notice_error(e) end private diff --git a/config/newrelic.yml b/config/newrelic.yml index 57e257c9a..a285af079 100644 --- a/config/newrelic.yml +++ b/config/newrelic.yml @@ -26,6 +26,7 @@ common: &default_settings # Logging level for log/newrelic_agent.log log_level: info + disable_sidekiq: true application_logging: # If `true`, all logging-related features for the agent can be enabled or disabled From d2baaf25b2dddd815366cf34df4e77841ee43e99 Mon Sep 17 00:00:00 2001 From: Rabbit Date: Tue, 13 Aug 2024 13:47:29 +0800 Subject: [PATCH 2/2] chore: log daily statistic error messages (#2134) --- app/services/charts/daily_statistic_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/charts/daily_statistic_generator.rb b/app/services/charts/daily_statistic_generator.rb index 268b136d4..29a9544ef 100644 --- a/app/services/charts/daily_statistic_generator.rb +++ b/app/services/charts/daily_statistic_generator.rb @@ -18,7 +18,7 @@ def call daily_statistic rescue Exception => e - NewRelic::Agent.notice_error(e) + Rails.logger.error "Error occurred during DailyStatisticGenerator error: #{e.message}" end private