diff --git a/lib/new_relic/agent/log_event_attributes.rb b/lib/new_relic/agent/log_event_attributes.rb index d3bc33b331..a38d1f1fd3 100644 --- a/lib/new_relic/agent/log_event_attributes.rb +++ b/lib/new_relic/agent/log_event_attributes.rb @@ -10,7 +10,7 @@ class LogEventAttributes ATTRIBUTE_VALUE_CHARACTER_LIMIT = 4094 def add_custom_attributes(attributes) - return if @custom_attribute_limit_reached + return if defined?(@custom_attribute_limit_reached) && @custom_attribute_limit_reached attributes.each do |key, value| next if absent?(key) || absent?(value)