In the olfactory system of Drosophila melanogaster, it is relatively straightforward to target in vivo measurements of neural activity to specific processing channels. This, together with the numerical simplicity of the Drosophila olfactory system, has produced rapid gains in our understanding of Drosophila olfaction. This review summarizes the neurophysiology of the first two layers of this system: the peripheral olfactory receptor neurons and their postsynaptic targets in the antennal lobe. We now understand in some detail the cellular and synaptic mechanisms that shape odor representations in these neurons. Together, these mechanisms imply that interesting neural adaptations to environmental statistics have occurred. These mechanisms also place some fundamental constraints on early sensory processing that pose challenges for higher brain regions. These findings suggest some general principles with broad relevance to early sensory processing in other modalities.