def configure_fields(conf)
      # This loop looks dump, but it is used to suppress the unused parameter configuration warning
      # Learned from `filter_record_transformer`.
      conf.elements.select { |element| element.name == 'fields' }.each do |element|
        element.each_pair { |k, v| element.has_key?(k) }
      end

      return unless @fields

      @extra_fields = @fields.corresponding_config_element.map { |k, v|
	[k, v.empty? ? k : v]
      }.to_h
    end
def configure_fields(conf)
      # This loop looks dump, but it is used to suppress the unused parameter configuration warning
      # Learned from `filter_record_transformer`.
      conf.elements.select { |element| element.name == 'fields' }.each do |element|
        element.each_pair { |k, v| element.has_key?(k) }
      end

      return unless @fields

      @extra_fields = @fields.corresponding_config_element.map { |k, v|
	[k, v.empty? ? k : v]
      }.to_h
    end
<fields> directive, which defines:
 * when data_type is event, index-time fields
 * when data_type is metric, metric dimensions