Canary in a coal mine

an early warning of danger
(A canary is a small bird)

e.g. low-lying islands in the middle of the world’s vast oceans will be the first to suffer the effects of rising tides due to climate change, providing an early warning of its impact; they are the canary in the coal mine of climate change.

The idiom comes from the practice until the late 20th Century in the U.K. and US to caged canaries (birds) that miners would carry down into the mine tunnels with them. If dangerous gases such as carbon monoxide collected in the mine, the gases would harm/kill the canary before killing the miners, warning the miners to exit the tunnels immediately.