Allowed Gauge to take synchronous functions.

Review: https://reviews.apache.org/r/20995