lib/new_relic/agent/configuration/manager.rb in newrelic_rpm-8.8.0 vs lib/new_relic/agent/configuration/manager.rb in newrelic_rpm-8.9.0

- old
+ new

@@ -251,11 +251,11 @@ else parse_labels_from_dictionary end rescue => e NewRelic::Agent.logger.error(PARSING_LABELS_FAILURE, e) - [] + NewRelic::EMPTY_ARRAY end def parse_labels_from_string labels = NewRelic::Agent.config[:labels] label_pairs = break_label_string_into_pairs(labels) @@ -291,10 +291,10 @@ # This can accept a hash, so force it down to an array of pairs first pairs = Array(pairs) unless valid_label_pairs?(pairs) NewRelic::Agent.logger.warn("#{MALFORMED_LABELS_WARNING}: #{labels || pairs}") - return [] + return NewRelic::EMPTY_ARRAY end pairs = limit_number_of_labels(pairs) pairs = remove_duplicates(pairs) pairs.map do |key, value|