Someday soon, perhaps within a year, you’ll be able to slap a soft, stretchy patch on to your arm that tells you if you’re dehydrated. Or that your electrolytes are dangerously out of balance. Or even that you have diabetes.

Fitness trackers such as Fitbit and Apple Watch already track step counts, heart rate and sleep rhythms. But they tend to be rigid and bulky, and mostly gather mechanical metrics, rather than assess a person’s underlying biology.

A new generation of devices instead aim to analyze sweat for many chemicals at once, producing a real-time snapshot of the wearer’s health or fitness. These devices also fit intimately against the skin, and are comfortable for anyone, from premature babies to the elderly. One version is already being advertised by Gatorade.

The latest advance in this technology, described Friday in the journal Science Advances, provides real-time information on the wearer’s pH, sweat rate, and levels of chloride, glucose and lactate — high levels of which could signal cystic fibrosis, diabetes or a lack of oxygen .