GO:0005034: osmosensor activity
Sensing extracellular osmolarity to initiate a change in cell activity, and spanning the membrane of the cell.