# File lib/new_relic/agent/transaction/datastore_segment.rb, line 31
        def set_instance_info host = nil, port_path_or_id = nil
          port_path_or_id = port_path_or_id.to_s if port_path_or_id
          host_present = host && !host.empty?
          ppi_present = port_path_or_id && !port_path_or_id.empty?

          host = NewRelic::Agent::Hostname.get_external host if host_present

          case
          when host_present && ppi_present
            @host = host
            @port_path_or_id = port_path_or_id

          when host_present && !ppi_present
            @host = host
            @port_path_or_id = UNKNOWN

          when !host_present && ppi_present
            @host = UNKNOWN
            @port_path_or_id = port_path_or_id

          else
            @host = @port_path_or_id = nil
          end
        end