Compare commits

...
+21 -2
View File
@@ -17,6 +17,14 @@ common: &default_settings
distributed_tracing:
enabled: true
sampling:
rate: 0.1 # Sample 10% of traces instead of 100%
# Source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/#attributes
attributes:
exclude:
- request.headers.* # Exclude request headers from traces
- response.headers.* # Exclude response headers from traces
# To disable the agent regardless of other settings, uncomment the following:
agent_enabled: <%= ENV['NEW_RELIC_LICENSE_KEY'].present? && ENV.fetch('NEW_RELIC_AGENT_ENABLED', true) %>
@@ -32,7 +40,7 @@ common: &default_settings
# If `true`, the agent captures log records emitted by this application
enabled: <%= ENV.fetch('NEW_RELIC_APPLICATION_LOGGING_FORWARDING_ENABLED', true) == "false" ? false : true %>
# Defines the maximum number of log records to buffer in memory at a time.
max_samples_stored: 30000
max_samples_stored: 10000
metrics:
# If `true`, the agent captures metrics related to logging for this application.
enabled: true
@@ -42,6 +50,16 @@ common: &default_settings
# This should not be used when forwarding is enabled.
enabled: <%= ENV.fetch('NEW_RELIC_APPLICATION_LOGGING_DECORATING_ENABLED', false) %>
# Transaction Tracer settings
# Source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/#transaction_tracer
transaction_tracer:
enabled: true # default: true
transaction_threshold: 4.0 # default 2s to 4s - only trace slower transactions
record_sql: obfuscated # Keep default - helps with security
stack_trace_threshold: 4.0 # Increase from 0.5s to 4s - reduce stack traces
explain_enabled: false # Disable SQL explain plans (default: true)
explain_threshold: 5.0 # Increase from 0.5s to 5s, only relevant if explain_enabled is true
# Environment-specific settings are in this section.
# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
@@ -53,11 +71,12 @@ development:
test:
<<: *default_settings
# It doesn't make sense to report to New Relic from automated test runs.
monitor_mode: false
monitor_mode: <%= ENV.fetch('NEW_RELIC_MONITORING_ENABLED', false) %>
staging:
<<: *default_settings
app_name: <%= ENV.fetch('NEW_RELIC_APP_NAME', 'Chatwoot') %> (Staging)
monitor_mode: <%= ENV.fetch('NEW_RELIC_MONITORING_ENABLED', false) %>
production:
<<: *default_settings